mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2024-11-10 21:55:11 +01:00
Handle unexpected exit
This commit is contained in:
parent
efff5046e4
commit
95003e88e6
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
WORK_DIR=$(mktemp -d -t wsa-build-XXXXXXXXXX_)
|
||||
trap 'rm -rf -- "$WORK_DIR"' EXIT
|
||||
WORK_DIR=$(mktemp -d -t wsa-build-XXXXXXXXXX_) || exit 1
|
||||
DOWNLOAD_DIR=../download
|
||||
OUTPUT_DIR=../output
|
||||
MOUNT_DIR="$WORK_DIR"/system
|
||||
@ -34,6 +34,7 @@ abort() {
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
trap abort EXIT
|
||||
|
||||
if [ ! "$BASH_VERSION" ] ; then
|
||||
echo "Please do not use sh to run this script, just execute it directly" 1>&2
|
||||
|
Loading…
Reference in New Issue
Block a user