updated to add dest-rel

This commit is contained in:
ronny abraham 2025-05-15 15:06:43 +03:00
parent a9346e4d37
commit 189d466a2a

View file

@ -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