diff --git a/git_automation.sh b/git_automation.sh new file mode 100755 index 0000000..16c32f6 --- /dev/null +++ b/git_automation.sh @@ -0,0 +1,15 @@ +#!/bin/bash +TRIGGER_FILE="/tmp/please_update" + +echo "[INFO] Watching $TRIGGER_FILE..." +while true; do + if [[ -f "$TRIGGER_FILE" ]]; then + rm -f "$TRIGGER_FILE" + echo "[INFO] Triggered at $(date)" + git status + git add . + git commit -m "Committed" + git push + fi + sleep 0.5 +done