Browse Source

`subroutines`: Dumb down `_abort`, smart up `_cleanup`

master
Michael Siegel 2 months ago
parent
commit
ca16a72f73
  1. 4
      include/subroutines

4
include/subroutines

@ -25,14 +25,14 @@ _abort() {
## Run _cleanup if "$TMP_DIR" exists and exit the script with a return code
## indicating an error
[[ -d "$TMP_DIR" ]] && _cleanup
_cleanup
exit 1
}
_cleanup() {
## Remove any temporary files
rm -rf -- "${TMP_DIR:?}"/*
[[ -d "$TMP_DIR" ]] && rm -rf -- "${TMP_DIR:?}"/*
}
_perr() {

Loading…
Cancel
Save