Don't use errexit, explicitly exit on failures

This commit is contained in:
Joshua Boniface 2018-12-14 18:57:12 -05:00
parent a7cdab9ae3
commit 0fec8f6493

View File

@ -14,10 +14,9 @@ cleanup() {
docker image rm $image_name --force
test -d "$package_temporary_dir" && rm -r "$package_temporary_dir"
}
trap cleanup EXIT
trap cleanup INT
trap cleanup EXIT INT
docker build . -t "$image_name" -f ./Dockerfile.debian_package
docker run --rm -v "$package_temporary_dir:/temp" "$image_name" cp -r /dist /temp/
sudo chown -R "$current_user" "$package_temporary_dir"
mv "$package_temporary_dir"/dist/*.deb ../
docker build . -t "$image_name" -f ./Dockerfile.debian_package || exit 1
docker run --rm -v "$package_temporary_dir:/temp" "$image_name" cp -r /dist /temp/ || exit 1
sudo chown -R "$current_user" "$package_temporary_dir" || exit 1
mv "$package_temporary_dir"/dist/*.deb ../ || exit 1