From e13bd4a1fd7674d1476e8d883bf5764603cb601a Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Fri, 22 Feb 2019 20:45:05 -0500 Subject: [PATCH] Revert "Don't bother cleaning up temp dir on appimage build." This reverts commit 96cdd3b5d5570c871fd7d40b87414f108bee209e. --- appimage/build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/appimage/build.sh b/appimage/build.sh index 63eaa2b2..1c74722e 100755 --- a/appimage/build.sh +++ b/appimage/build.sh @@ -13,6 +13,14 @@ fi BUILD_DIR=$(mktemp -d -p "$TEMP_BASE" AppImageLauncher-build-XXXXXX) +# make sure to clean up build dir, even if errors occur +cleanup () { + if [ -d "$BUILD_DIR" ]; then + rm -rf "$BUILD_DIR" + fi +} +trap cleanup EXIT + # store repo root as variable REPO_ROOT=$(readlink -f $(dirname $(dirname $0))) OLD_CWD=$(readlink -f .) @@ -47,5 +55,3 @@ chmod +x appimagetool-x86_64.AppImage ./appimagetool-x86_64.AppImage conky*.AppImage --sign mv conky*.AppImage "$OLD_CWD" - -popd