add trap to installation script

This commit is contained in:
kevinnls
2021-03-17 01:41:16 +05:30
parent 18d58941af
commit 6676ddafcc

View File

@@ -149,9 +149,11 @@ cleanup(){
# cleanup # cleanup
cd "$HOME" cd "$HOME"
rm -rf "$work_dir" rm -rf "$work_dir"
exit $1 exit ${1-0}
} }
trap "cleanup 1" SIGHUP SIGINT SIGTERM ERR
install(){ install(){
setup setup
find_dler find_dler