File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 44
55# Check if the correct number of arguments is provided
66if [ " $# " -ne 2 ]; then
7- echo " Usage: move_logseq_content.sh <export_folder> <blog_folder>"
8- exit 1
7+ echo " Usage: move_logseq_content.sh <export_folder> <blog_folder>"
8+ exit 1
99fi
1010
1111# Extract arguments
@@ -14,14 +14,14 @@ blog_folder="$2"
1414
1515# Check if the export folder exists
1616if [ ! -d " $export_folder " ]; then
17- echo " Error: The export folder does not exist."
18- exit 1
17+ echo " Error: The export folder does not exist."
18+ exit 1
1919fi
2020
2121# Check if the blog folder exists
2222if [ ! -d " $blog_folder " ]; then
23- echo " Error: The blog folder does not exist."
24- exit 1
23+ echo " Error: The blog folder does not exist."
24+ exit 1
2525fi
2626
2727blog_content_folder=" ${BLOG_CONTENT_FODLER:-/ graph} "
@@ -48,7 +48,8 @@ cp -R "$export_folder/logseq-pages"/* "$pages_destination/"
4848cp -R " $export_folder /logseq-assets" /* " $assets_destination /"
4949
5050# replace the /logseq-asstes/ paths with the hugo image folder
51- find " $pages_destination " -type f -exec sed -i ' ' -e " s@/logseq-assets/@$images_folder /@g" {} \;
52- find " $pages_destination " -type f -exec sed -i ' ' -e " s@/logseq-pages/@$blog_content_folder /@g" {} \;
51+ find " $pages_destination " -type f -exec sed -i.bak -e " s@/logseq-assets/@$images_folder /@g" {} \;
52+ find " $pages_destination " -type f -exec sed -i.bak -e " s@/logseq-pages/@$blog_content_folder /@g" {} \;
53+ rm -f " $pages_destination " /* .bak
5354
5455echo " Content moved successfully."
You can’t perform that action at this time.
0 commit comments