fix: sysjournal finds the vault (Obsidian-Personal, then the pre-split names)

This commit is contained in:
bcherb2 committed 2026-11-18 01:30:14 -05:00
1 parent 8d660aaa01
commit 9be9522c08
1 file changed
+14 -1
+14 -1
View File
@@ -14,7 +14,20 @@
set -euo pipefail set -euo pipefail
VAULT="${SYSJOURNAL_VAULT:-$HOME/Documents/Obsidian25}" # Vault location. SYSJOURNAL_VAULT always wins; otherwise take the first
# candidate that exists on this machine. Obsidian-Personal is the cutover
# target, so it is preferred wherever it has landed; the pre-split vault is
# the fallback for machines that have not synced the split yet, and it is
# named Obsidian25 on Linux but Obsidian2 on the MacBook.
sysjournal_default_vault() {
local c
for c in "Obsidian-Personal" "Obsidian25" "Obsidian2"; do
[ -d "$HOME/Documents/$c" ] && { printf '%s' "$HOME/Documents/$c"; return; }
done
printf '%s' "$HOME/Documents/Obsidian-Personal" # for the error message
}
VAULT="${SYSJOURNAL_VAULT:-$(sysjournal_default_vault)}"
SUBDIR="${SYSJOURNAL_SUBDIR:-Tech/Infrastructure}" SUBDIR="${SYSJOURNAL_SUBDIR:-Tech/Infrastructure}"
INFRA="$VAULT/$SUBDIR" INFRA="$VAULT/$SUBDIR"