fix: erase eventual temporary file in case of error exit; version bump

This commit is contained in:
levasseur
2021-10-08 17:40:11 +02:00
parent 33da21dfe2
commit 5324ee0636
2 changed files with 4 additions and 1 deletions

View File

@@ -36,7 +36,7 @@ export LC_ALL=C
export LANG=C export LANG=C
# Version of init # Version of init
export VERSION="0.99.9" export VERSION="0.99.10"
# Store script's path (realpath -s resolve symlinks if init.sh is a symlink) # Store script's path (realpath -s resolve symlinks if init.sh is a symlink)
export MYPATH=$(dirname $(realpath -s $0)) export MYPATH=$(dirname $(realpath -s $0))

View File

@@ -72,6 +72,9 @@ trap "error ${LINENO}; backtrace; err_exit" ERR
# Exit program in case of error unless keepgoing is set to true # Exit program in case of error unless keepgoing is set to true
function err_exit function err_exit
{ {
if [[ -n $tmpfile ]]; then
rm -f $tmpfile
fi
if [[ $KEEPGOING != true ]]; then if [[ $KEEPGOING != true ]]; then
exit 255 exit 255
fi fi