From 189d466a2a05c4045e092c87142c5dab324dc757 Mon Sep 17 00:00:00 2001 From: ronny abraham Date: Thu, 15 May 2025 15:06:43 +0300 Subject: [PATCH] updated to add dest-rel --- export-notes.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/export-notes.sh b/export-notes.sh index 0bdbcfd..f7f0cba 100755 --- a/export-notes.sh +++ b/export-notes.sh @@ -101,7 +101,7 @@ done if [ -z "$SECTION_DIR" ]; then full_path="$(cd "$(pwd)" && pwd)" base_path="$(cd "$SOURCE_BASE/$NOTES_ROOT" && pwd)" - SECTION_DIR="${full_path#"$base_path"/}" + SECTION_DIR="${full_path#"$base_path"}" fi @@ -120,7 +120,11 @@ else DEST_ROOT="/var/www" fi -DEST_DIR="$DEST_ROOT/$NOTES_ROOT/$SECTION_DIR" +if [ -n "$DEST_REL" ]; then + DEST_DIR="$DEST_ROOT/$DEST_REL/$SECTION_DIR" +else + DEST_DIR="$DEST_ROOT/$NOTES_ROOT/$SECTION_DIR" +fi # ---------------------------- # Debug Output