summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
Diffstat (limited to 'files')
-rw-r--r--files/core-functions.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/files/core-functions.sh b/files/core-functions.sh
index 19eebf3..fa02653 100644
--- a/files/core-functions.sh
+++ b/files/core-functions.sh
@@ -7,8 +7,10 @@
# Clean-up tmp and lock files
#
function cleanup() {
+ local retval=0
[ "$SPINNING" = "off" ] || tput cnorm
if [ -e $TMPDIR/error.log ]; then
+ retval=1
echo -e "
\n==============================================================================
WARNING! WARNING! WARNING! WARNING! WARNING!
@@ -24,7 +26,7 @@ One or more errors occurred while slackpkg was running:
rm $CACHEPATH/$NAMEPKG &>/dev/null
fi
( rm -f /var/lock/slackpkg.$$ && rm -rf $TMPDIR ) &>/dev/null
- exit
+ exit ${retval}
}
trap 'cleanup' 2 14 15 # trap CTRL+C and kill