diff options
author | Aaron LI <aly@aaronly.me> | 2019-10-16 13:54:10 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-10-16 13:54:10 +0800 |
commit | 30f17b89f09b8f531a9fb61175b4c456ded3b843 (patch) | |
tree | 23d8d1cb6e80e4606674fc67bb898a0599d620bb /cli | |
parent | 69831225acd6b3b770bb4bc8b14dfc284e382567 (diff) | |
download | atoolbox-30f17b89f09b8f531a9fb61175b4c456ded3b843.tar.bz2 |
cli/unzip-gbk: Exit if error occurs
Diffstat (limited to 'cli')
-rwxr-xr-x | cli/unzip-gbk.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/unzip-gbk.sh b/cli/unzip-gbk.sh index 53c7b57..37d152c 100755 --- a/cli/unzip-gbk.sh +++ b/cli/unzip-gbk.sh @@ -43,13 +43,13 @@ esac zipfile=$(realpath "$1") curdir=$(pwd) tmpdir=$(mktemp -d) -cd "${tmpdir}" +cd "${tmpdir}" || exit $? echo "Extracting archive '${zipfile}' ..." extract "${zipfile}" echo "Fixing filenames ..." fixnames -cd "${curdir}" +cd "${curdir}" || exit $? mv "${tmpdir}"/* . rmdir "${tmpdir}" |