Files
obsidian-sync/app.sh
Lauren Kaviak afb471c720
All checks were successful
Continuous Releases / build (push) Successful in 51s
git ignore, fix option on command line
2026-06-15 22:17:40 -05:00

22 lines
665 B
Bash
Executable File

#!/bin/sh
EMAIL=$(cat $EMAIL_FILE)
PASSWORD=$(cat $PASSWORD_FILE)
ob login --email "$EMAIL" --password "$PASSWORD"
# Source - https://stackoverflow.com/a/13864829
# Posted by Lionel, modified by community. See post 'Timeline' for change history
# Retrieved 2026-06-15, License - CC BY-SA 4.0
if [ -z ${VAULT_PASSWORD_FILE+x} ]; then
ob sync-setup --vault "$VAULT_NAME" --path "$SYNC_FOLDER";
else
VAULT_PASSWORD=$(cat $VAULT_PASSWORD_FILE);
ob sync-setup --vault "$VAULT_NAME" --path "$SYNC_FOLDER" --password "$VAULT_PASSWORD";
fi
if [ $WATCH = true ]; then
ob sync --continuous --path "$SYNC_FOLDER";
else
ob sync --path "$SYNC_FOLDER";
fi