diff options
author | piterpunk <piterpunk@slackware.com> | 2021-10-08 15:35:20 -0300 |
---|---|---|
committer | Robby Workman <rworkman@slackware.com> | 2021-10-12 00:34:27 -0500 |
commit | 13c79b1eb2b3d64a935d89c56d53776063b56820 (patch) | |
tree | 84b8f04f87c021bedfdf53747069620bf106703a /files/core-functions.sh | |
parent | 9862db7e31ba8a0bc02bf93b38ef5084d7616d28 (diff) | |
download | slackpkg-13c79b1eb2b3d64a935d89c56d53776063b56820.tar.xz |
New exit status for different situations
To make easier to do an unattended slackpkg update/upgrade process,
this commit provides different exit codes to many situations:
0 Successful slackpkg execution.
1 Something wrong happened.
20 No package found to be downloaded, installed, reinstalled,
upgraded, or removed.
50 Slackpkg itself was upgraded and you need to re-run it.
100 There are pending updates.
Code and the main manpage are updated accordingly.
In addition, this commit also:
- removes the ChangeLog.txt in doinst.sh, so the needed
'slackpkg update' after Slackpkg upgrade won't says it's all OK
and don't need to redo the package lists
- removes AUTHORS from manpage. Nowadays there are code from many
people in Slackpkg and shows a bit unfair to have only my and
Evaldo's name listed there.
Signed-off-by: Robby Workman <rworkman@slackware.com>
Diffstat (limited to 'files/core-functions.sh')
-rw-r--r-- | files/core-functions.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/files/core-functions.sh b/files/core-functions.sh index 1a50627..5969ffc 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=${PENDING_UPDATES:-0} + local retval=${EXIT_CODE:-0} [ "$SPINNING" = "off" ] || tput cnorm if [ -e $TMPDIR/error.log ]; then retval=1 |