Commit Diff
Diff:
79a0dfab1517c167eece73eac390bbda6b979cea
cd6c349b9102a05b100e52618c2284d333f2c1a5
Commit:
cd6c349b9102a05b100e52618c2284d333f2c1a5
Tree:
204aaa07bea2cab6cd57b9e4125b19bd7a8d39be
Author:
Fred. Galusik <f@galusik.fr>
Committer:
Fred. Galusik <f@galusik.fr>
Date:
Sat Apr 25 14:06:18 2020 UTC
Message:
take care of hucste shellcheck reco
blob - 93faad318f795b238cfc2340c4edf76d3dd0177c
blob + b295101d3330458a0a341dbf5a8f99fd2b2063f2
--- snaps
+++ snaps
@@ -53,6 +53,8 @@ MIRRORPKG=${MIRROR}/snapshots/packages/${ARCH}/
SHAF=SHA256
+GET='ftp -n -m -C'
+
LOGF=/var/log/snaps.log
NOW=$(date "+ %Y-%m-%d %R")
@@ -64,16 +66,15 @@ LASTSNAPS=/tmp/snaps
###
toupgrade() {
- echo "\n=== NEW VERSION CHECKING ==="
+ printf "\n %s" "=== NEW VERSION CHECKING ==="
# some cleanup to not let ftp warn about not supporting resume
if [[ -f $LASTSNAPS ]]; then
rm -f $LASTSNAPS
fi
- $GET -V -o "$LASTSNAPS" "$REMOTESNAPS"
- REMOTEVERSION=$(awk -F '=' '/^VERSION=/ { print $2 }' "$LASTSNAPS")
+ if $GET -V -o "$LASTSNAPS" "$REMOTESNAPS"; then
- if [ $? -eq 0 ]; then
+ REMOTEVERSION=$(awk -F '=' '/^VERSION=/ { print $2 }' "$LASTSNAPS")
if [ "$VERSION" != "$REMOTEVERSION" ]; then
echo "==> WARNING: snaps is not up-to-date !"
Frédéric Galusik