From d53accaad8db1d99ed7bbb4a9020ee0c9dcdc1d7 Mon Sep 17 00:00:00 2001 From: "root@saturn" Date: Wed, 15 Jun 2016 17:52:33 +0200 Subject: [PATCH] removed lastsync bug fix. rsync runs when runed in shell --- archlinux.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archlinux.sh b/archlinux.sh index 39e7e0e..5ae1b11 100755 --- a/archlinux.sh +++ b/archlinux.sh @@ -25,8 +25,9 @@ exec 9>"${lock}" flock -n 9 || exit # only run rsync when there are changes -if diff -b <(curl -s "$lastupdate_url") "$target/lastupdate" >/dev/null; then +if diff -b <(curl -s "$lastupdate_url") "$target/lastupdate" >/dev/null && ! stty &>/dev/null; then echo "rsync was not needed" >> $logfile + date +%s > $target/lastsync else echo "running rsync" >> $logfile @@ -42,7 +43,6 @@ else "${target}" &>> $logfile || fatal "Failed to sync." fi -date +%s > $target/lastsync echo "lastsync: $(date -d @$(cat ${target}/lastsync))" >> $logfile