From ffba6061bc6061dfd9541755c66cd53561cbf7b5 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Thu, 25 Sep 2025 13:57:57 +0000 Subject: [PATCH] contrib: "set -e" behaves weird in subshells followed by OR. don't use. This exits as expected: ``` $ cat s1.sh #!/bin/bash set -e ( echo "a" false echo "b" ) $ ./s1.sh a ``` This does NOT exit, seemingly because of the outer context?! ``` $ cat s2.sh #!/bin/bash set -e ( echo "a" false echo "b" ) || echo "c" $ ./s2.sh a b ``` ref https://unix.stackexchange.com/questions/65532/why-does-set-e-not-work-inside-subshells-with-parenthesis-followed-by-an-or --- contrib/build-linux/appimage/build.sh | 4 ++-- contrib/build-linux/appimage/make_appimage.sh | 2 +- contrib/build-wine/prepare-wine.sh | 2 +- contrib/osx/make_osx.sh | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/build-linux/appimage/build.sh b/contrib/build-linux/appimage/build.sh index d986befb2..8c1bfd7f5 100755 --- a/contrib/build-linux/appimage/build.sh +++ b/contrib/build-linux/appimage/build.sh @@ -50,7 +50,7 @@ else info "not doing fresh clone." fi -# build the type2-runtime binary, this build step uses a separate docker container +# build the type2-runtime binary, this build step uses a separate docker container # defined in the type2-runtime repo (patched with type2-runtime-reproducible-build.patch) TYPE2_RUNTIME_REPO_DIR="$PROJECT_ROOT_OR_FRESHCLONE_ROOT/contrib/build-linux/appimage/.cache/appimage/type2-runtime" ( @@ -74,7 +74,7 @@ TYPE2_RUNTIME_REPO_DIR="$PROJECT_ROOT_OR_FRESHCLONE_ROOT/contrib/build-linux/app rm -rf "$TYPE2_RUNTIME_REPO_DIR/out" info "runtime build successful: $(sha256sum "$TYPE2_RUNTIME_REPO_DIR/runtime-x86_64")" -) || fail "Failed to build type2-runtime" +) info "building binary..." # check uid and maybe chown. see #8261 diff --git a/contrib/build-linux/appimage/make_appimage.sh b/contrib/build-linux/appimage/make_appimage.sh index 637039111..061a12a28 100755 --- a/contrib/build-linux/appimage/make_appimage.sh +++ b/contrib/build-linux/appimage/make_appimage.sh @@ -181,7 +181,7 @@ info "finalizing AppDir." mv usr/include usr/include.tmp delete_blacklisted mv usr/include.tmp usr/include -) || fail "Could not finalize AppDir" +) info "Copying additional libraries" ( diff --git a/contrib/build-wine/prepare-wine.sh b/contrib/build-wine/prepare-wine.sh index 57396e9ed..f9553f7e5 100755 --- a/contrib/build-wine/prepare-wine.sh +++ b/contrib/build-wine/prepare-wine.sh @@ -95,7 +95,7 @@ info "Building PyInstaller." popd # sanity check bootloader is there: [[ -e "PyInstaller/bootloader/Windows-$PYINST_ARCH-intel/runw.exe" ]] || fail "Could not find runw.exe in target dir!" -) || fail "PyInstaller build failed" +) info "Installing PyInstaller." $WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-warn-script-location ./pyinstaller diff --git a/contrib/osx/make_osx.sh b/contrib/osx/make_osx.sh index 5f2032433..608806c7b 100755 --- a/contrib/osx/make_osx.sh +++ b/contrib/osx/make_osx.sh @@ -117,7 +117,7 @@ PYINSTALLER_COMMIT="306d4d92580fea7be7ff2c89ba112cdc6f73fac1" popd # sanity check bootloader is there: [[ -e "PyInstaller/bootloader/Darwin-64bit/runw" ]] || fail "Could not find runw in target dir!" -) || fail "PyInstaller build failed" +) info "Installing PyInstaller." python3 -m pip install --no-build-isolation --no-dependencies \ --cache-dir "$PIP_CACHE_DIR" --no-warn-script-location "$CACHEDIR/pyinstaller" @@ -144,7 +144,7 @@ info "preparing electrum-locale." "$CONTRIB/locale/build_cleanlocale.sh" # we want the binary to have only compiled (.mo) locale files; not source (.po) files rm -r "$PROJECT_ROOT/electrum/locale/locale"/*/electrum.po -) || fail "failed generating locale" +) if ls "$DLL_TARGET_DIR"/libsecp256k1.*.dylib 1> /dev/null 2>&1; then