From 0080f0810dd5293e1ae108d7f60ae638d4d547b4 Mon Sep 17 00:00:00 2001 From: Dave Woodfall Date: Fri, 12 Mar 2021 20:58:54 +0000 Subject: Fix exit code for pending updates. --- files/ChangeLog | 1 + files/core-functions.sh | 2 +- files/slackpkg | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'files') diff --git a/files/ChangeLog b/files/ChangeLog index 0c0354a..1a4ae3f 100644 --- a/files/ChangeLog +++ b/files/ChangeLog @@ -1,5 +1,6 @@ --------------- + - Fix exit code for pending updates (dive) - Avoid matching txz/tgz etc extension when blacklisting (dive) - Use https for all slackpkg homepage links - Update mirror files (14.2 -> 15.0) diff --git a/files/core-functions.sh b/files/core-functions.sh index db7cd5d..85ceb2c 100644 --- a/files/core-functions.sh +++ b/files/core-functions.sh @@ -7,7 +7,7 @@ # Clean-up tmp and lock files # function cleanup() { - local retval=0 + local retval=${PENDING_UPDATES:-0} [ "$SPINNING" = "off" ] || tput cnorm if [ -e $TMPDIR/error.log ]; then retval=1 diff --git a/files/slackpkg b/files/slackpkg index 51c8572..746a8c5 100644 --- a/files/slackpkg +++ b/files/slackpkg @@ -332,6 +332,7 @@ case "$CMD" in echo "Slackpkg: No updated packages since last check." else echo "Slackpkg: Updated packages are available since last check." >&2 + PENDING_UPDATES=1 fi ;; show-changelog) -- cgit v1.2.3