diff options
author | Erich Eckner <git@eckner.net> | 2020-01-21 15:23:44 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-01-21 15:23:44 +0100 |
commit | a1ed54faa6c1025db61d1b07719332173391b5e9 (patch) | |
tree | dbb222a0d82bc47e7cfda78c13500b54a3ec92cb /watch-calendars | |
parent | fb21924922aece6b197165cf09e3a40b15fb4dbf (diff) | |
download | khal-extras-a1ed54faa6c1025db61d1b07719332173391b5e9.tar.xz |
watch-calendars: commit unconditionally
Diffstat (limited to 'watch-calendars')
-rwxr-xr-x | watch-calendars | 8 |
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 |