feat: add SPINE_ORG env var to override org file path
Add SPINE_ORG environment variable support to scripts/run. When set, the value is passed as spine-org-file via --eval before loading spine.el. Usage: SPINE_ORG=~/my-books.org ./scripts/run SPINE_ORG=/work/personal-local/spine/sample-books.org ./scripts/run localhost:9090 When unset, defaults to ~/spine/books.org (existing behavior).
This commit is contained in:
+5
-6
@@ -15,14 +15,13 @@ if [ $# -ge 1 ] && [ -n "$1" ]; then
|
||||
else
|
||||
PORT="$ARG"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Stop any existing spine daemon
|
||||
emacsclient --socket-name=spine --eval '(kill-emacs)' 2>/dev/null || true
|
||||
|
||||
# Build emacs args
|
||||
EMACS_ARGS=(emacs --quick --daemon=spine)
|
||||
|
||||
# If SPINE_ORG env var is set, override the org file path
|
||||
if [ -n "${SPINE_ORG:-}" ]; then
|
||||
EMACS_ARGS+=(--eval "(setq spine-org-file \"$SPINE_ORG\")")
|
||||
fi
|
||||
|
||||
if [ -n "$HOST" ]; then
|
||||
EMACS_ARGS+=(--eval "(setq spine-host \"$HOST\")")
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user