From 80b4c81b618d4e75b301ac1dd5adfb47f91deca7 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 4 Aug 2022 17:41:27 +0300 Subject: Moved a lot of stuff to a new folder called .a --- .a/git-autocommit.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 .a/git-autocommit.sh (limited to '.a/git-autocommit.sh') 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 -- cgit v1.2.3