fix: erase eventual temporary file in case of error exit; version bump
This commit is contained in:
2
init.sh
2
init.sh
@@ -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))
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user