diff options
| author | danix <danix@danix.xyz> | 2023-04-18 09:11:37 +0200 |
|---|---|---|
| committer | danix <danix@danix.xyz> | 2023-04-18 09:11:37 +0200 |
| commit | cf9f797b245fef7b4ca2694c936520bce337032d (patch) | |
| tree | 073565f284b9ec91d6f385a21ea69485360f8bd8 /SOURCE/CORE/git.sh | |
| parent | d1f115c1bcef830147519b1c3e950828b5626cdc (diff) | |
| download | bash-notes-cf9f797b245fef7b4ca2694c936520bce337032d.tar.gz bash-notes-cf9f797b245fef7b4ca2694c936520bce337032d.zip | |
if PLAIN option is enabled, git pull doesn't emit output.
Diffstat (limited to 'SOURCE/CORE/git.sh')
| -rw-r--r-- | SOURCE/CORE/git.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/SOURCE/CORE/git.sh b/SOURCE/CORE/git.sh index ff674df..3ddec6c 100644 --- a/SOURCE/CORE/git.sh +++ b/SOURCE/CORE/git.sh @@ -26,7 +26,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") @@ -36,7 +36,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" |
