diff --git a/enter/Coding Tips (Classical)/Project Vault/Obsidian/Obsidian-git process.md b/enter/Coding Tips (Classical)/Project Vault/Obsidian/Obsidian-git process.md index 22b3856..ccff106 100644 --- a/enter/Coding Tips (Classical)/Project Vault/Obsidian/Obsidian-git process.md +++ b/enter/Coding Tips (Classical)/Project Vault/Obsidian/Obsidian-git process.md @@ -275,7 +275,38 @@ fi ``` +Attempt #3 (this one worked!!): +```shell +#!/usr/bin/env sh + +export ZK_PATH=/Volumes/GoogleDrive-117209510583853875316/My\ Drive/Resources/collabtestdir/Notepad + +cd "$ZK_PATH" + +git fetch + +CHANGES_EXIST=$(git status — porcelain | wc -l) + +current="`date +'%Y-%m-%d %H:%M:%S'`" + +msg="Updated: $current" + + +if [ “$CHANGES_EXIST” -eq 0 ];  +then + exit 0 + + +fi + git add --all;  + git commit -q -m "$msg + $CHANGES_EXIST"; + # Updated: 2019-08-28 10:22:06 + lines changes + sleep 10 # for testing + git pull # --rebase is the default + sleep 10 # for testing + git push -q +``` 4. Now it is time to submit this to the `launchd` scheduler. Navigate to 5.