diff options
author | nachoparker <nacho@ownyourbits.com> | 2021-07-24 22:54:31 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2021-07-25 23:59:07 +0300 |
commit | 665ed28ae6e84f154bff10916e1636244fc88f9b (patch) | |
tree | 7e1cb75c38ebb87a4c8d8f211a612a442deb4ade /bin | |
parent | effdd6cdb3057a60457d71c4bd3d4298d76f2d65 (diff) |
build: trap and curl installer fixes
Signed-off-by: nachoparker <nacho@ownyourbits.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ncp-update | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ncp-update b/bin/ncp-update index 93c11408..4f07907d 100755 --- a/bin/ncp-update +++ b/bin/ncp-update @@ -9,7 +9,7 @@ [[ "$BRANCH" != "master" ]] && echo "INFO: updating to development branch '$BRANCH'" TMPDIR="$( mktemp -d /tmp/ncp-update.XXXXXX || ( echo "Failed to create temp dir. Exiting" >&2; exit 1 ) )" - trap "cd /; rm -rf \"${TMPDIR}\"; exit 0" 0 1 2 3 15 + trap 'ret=$?; cd /; rm -rf "${TMPDIR}"; exit $ret' EXIT echo -e "Downloading updates" git clone --depth 20 -b "$BRANCH" -q https://github.com/nextcloud/nextcloudpi.git "$TMPDIR" || { @@ -20,7 +20,7 @@ [[ -f /.ncp-image ]] || cd "$TMPDIR" # update locally during build echo -e "Performing updates" - ./update.sh || exit 1 + ./update.sh || exit $? cd "$TMPDIR" VER=$( git describe --always --tags | grep -oP "v\d+\.\d+\.\d+" ) |