From a1ed54faa6c1025db61d1b07719332173391b5e9 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 21 Jan 2020 15:23:44 +0100 Subject: watch-calendars: commit unconditionally --- watch-calendars | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'watch-calendars') 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 -- cgit v1.2.3-70-g09d2