diff options
Diffstat (limited to '.a/git-autocommit.sh')
| -rwxr-xr-x | .a/git-autocommit.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/.a/git-autocommit.sh b/.a/git-autocommit.sh new file mode 100755 index 0000000..f969509 --- /dev/null +++ b/.a/git-autocommit.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +TIME_SCALE=60 # In seconds +TIME_INTERVAL=5 # Multiplier of TIME_SCALE + + +ACCUMULATOR=0 +while true; do + if ! ((ACCUMULATOR % TIME_INTERVAL)) && [[ `git status --porcelain` ]]; then + MSG="Autocommit at $(date +'%d.%m.%Y @ %H:%M')" + + git add . && git commit -m "$MSG" && git push + + echo $MSG + fi + + sleep $TIME_SCALE + ((ACCUMULATOR++)) +done |
