scripts/functions.sh
2025-06-23 14:33:43 +02:00

16 lines
351 B
Bash

# NOTE: config should be loaded by the script using this shared functions.sh
# Sync notes via git
notesSync() {
{
path="${notes_dir}/"
cd "$path"
git pull --quiet
git add .
git commit -m "[bash script] update/add entries" >> /dev/null
git push --quiet
} || {
# Report; TODO: write log
echo ">>> Sync failed"
}
}