summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-01-21 15:23:44 +0100
committerErich Eckner <git@eckner.net>2020-01-21 15:23:44 +0100
commita1ed54faa6c1025db61d1b07719332173391b5e9 (patch)
treedbb222a0d82bc47e7cfda78c13500b54a3ec92cb
parentfb21924922aece6b197165cf09e3a40b15fb4dbf (diff)
downloadkhal-extras-a1ed54faa6c1025db61d1b07719332173391b5e9.tar.xz
watch-calendars: commit unconditionally
-rwxr-xr-xwatch-calendars8
1 files changed, 3 insertions, 5 deletions
diff --git a/watch-calendars b/watch-calendars
index e55e6b8..7c02e06 100755
--- a/watch-calendars
+++ b/watch-calendars
@@ -10,11 +10,9 @@ if [ $# -eq 0 ]; then
fi
while [ -d "$1" ]; do
- inotifywait -r "$1" -e CREATE,MOVED_TO -t 30
- if [ $? -eq 0 ]; then
- git -C "$1" add .
- git -C "$1" commit -m'update by '"$(whoami)"'@'"$(hostname)"' on '"$(date)"
- fi
+ inotifywait -r "$1" -e CREATE,MOVED_TO,DELETE -t 30
+ git -C "$1" add -A
+ git -C "$1" commit -m'update by '"$(whoami)"'@'"$(hostname)"' on '"$(date)"
git -C "$1" pull --rebase
git -C "$1" push
done