From cf9f797b245fef7b4ca2694c936520bce337032d Mon Sep 17 00:00:00 2001 From: danix Date: Tue, 18 Apr 2023 09:11:37 +0200 Subject: if PLAIN option is enabled, git pull doesn't emit output. --- notes.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'notes.sh') diff --git a/notes.sh b/notes.sh index 687fefe..089daca 100755 --- a/notes.sh +++ b/notes.sh @@ -268,7 +268,7 @@ gitsync() { $JQ --arg n "$NOWSYNC" '.git["lastpull"] = $n' "$DB" > $TMPDB mv $TMPDB $DB cd $BASEDIR - $GIT pull + [ $PLAIN == false ] && $GIT pull || $GIT pull -q else # LASTSYNC is the last time we synced to the remote, or 0 if it's the first time. LASTSYNC=$($JQ -r '.git["lastpull"] // 0' "$DB") @@ -278,7 +278,7 @@ gitsync() { $JQ --arg n "$NOWSYNC" '.git["lastpull"] = $n' "$DB" > $TMPDB mv $TMPDB $DB cd $BASEDIR - $GIT pull + [ $PLAIN == false ] && $GIT pull || $GIT pull -q else # Last synced less than $GITSYNCDELAY seconds ago. We shall wait [ $PLAIN == false ] && echo "Last synced less than $GITSYNCDELAY seconds ago. We shall wait" -- cgit v1.2.3