From 7d708f65b60b0a28d07a9f8d37ac259c44a14bf2 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sat, 31 May 2025 01:01:15 -0700 Subject: [PATCH] Exit all bash scripts on error --- bin/installation/activate-tools.sh | 1 + bin/installation/buildroot-install.sh | 1 + bin/installation/elf2hex-install.sh | 1 + bin/installation/glib-installation.sh | 1 + bin/installation/python-setup.sh | 1 + bin/installation/qemu-install.sh | 1 + bin/installation/riscv-gnu-toolchain-install.sh | 1 + bin/installation/sail-install.sh | 1 + bin/installation/skywater-lib-install.sh | 1 + bin/installation/spike-install.sh | 1 + bin/installation/verilator-install.sh | 1 + bin/installation/wally-installation-helper-functions.sh | 2 ++ 12 files changed, 13 insertions(+) diff --git a/bin/installation/activate-tools.sh b/bin/installation/activate-tools.sh index 2c04543f0..af7e782b2 100755 --- a/bin/installation/activate-tools.sh +++ b/bin/installation/activate-tools.sh @@ -27,6 +27,7 @@ ## and limitations under the License. ################################################################################################ +set -e # break on error # If run standalone, check environment. Otherwise, use info from main install script if [ -z "$FAMILY" ]; then dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/bin/installation/buildroot-install.sh b/bin/installation/buildroot-install.sh index 4a59462b1..40f5699d5 100755 --- a/bin/installation/buildroot-install.sh +++ b/bin/installation/buildroot-install.sh @@ -27,6 +27,7 @@ ## and limitations under the License. ################################################################################################ +set -e # break on error # If run standalone, check environment. Otherwise, use info from main install script if [ -z "$FAMILY" ]; then dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/bin/installation/elf2hex-install.sh b/bin/installation/elf2hex-install.sh index aef49ec70..7e0e2690e 100755 --- a/bin/installation/elf2hex-install.sh +++ b/bin/installation/elf2hex-install.sh @@ -29,6 +29,7 @@ ELF2HEX_VERSION=f28a3103c06131ed3895052b1341daf4ca0b1c9c # Last commit as of May 30, 2025 +set -e # break on error # If run standalone, check environment. Otherwise, use info from main install script if [ -z "$FAMILY" ]; then dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/bin/installation/glib-installation.sh b/bin/installation/glib-installation.sh index 6f75fb0bc..db8ef83d3 100755 --- a/bin/installation/glib-installation.sh +++ b/bin/installation/glib-installation.sh @@ -27,6 +27,7 @@ ## and limitations under the License. ################################################################################################ +set -e # break on error # If run standalone, check environment. Otherwise, use info from main install script if [ -z "$FAMILY" ]; then dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/bin/installation/python-setup.sh b/bin/installation/python-setup.sh index 41bef025f..d746efd89 100755 --- a/bin/installation/python-setup.sh +++ b/bin/installation/python-setup.sh @@ -27,6 +27,7 @@ ## and limitations under the License. ################################################################################################ +set -e # break on error # If run standalone, check environment. Otherwise, use info from main install script if [ -z "$FAMILY" ]; then dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/bin/installation/qemu-install.sh b/bin/installation/qemu-install.sh index 60a75364e..5d16a8dd2 100755 --- a/bin/installation/qemu-install.sh +++ b/bin/installation/qemu-install.sh @@ -29,6 +29,7 @@ QEMU_VERSION=v10.0.2 # Last release as of May 30, 2025 +set -e # break on error # If run standalone, check environment. Otherwise, use info from main install script if [ -z "$FAMILY" ]; then dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/bin/installation/riscv-gnu-toolchain-install.sh b/bin/installation/riscv-gnu-toolchain-install.sh index f6e46bcac..c5dcf6a2b 100755 --- a/bin/installation/riscv-gnu-toolchain-install.sh +++ b/bin/installation/riscv-gnu-toolchain-install.sh @@ -29,6 +29,7 @@ RISCV_GNU_TOOLCHAIN_VERSION=23863c2ca74e6c050f0c97e7af61f5f1776aadd1 # Last commit with GCC 14.2.0 +set -e # break on error # If run standalone, check environment. Otherwise, use info from main install script if [ -z "$FAMILY" ]; then dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/bin/installation/sail-install.sh b/bin/installation/sail-install.sh index 10af95598..c9f031541 100755 --- a/bin/installation/sail-install.sh +++ b/bin/installation/sail-install.sh @@ -31,6 +31,7 @@ SAIL_COMPILER_VERSION=0.19 # Last release as of May 30, 2025 CMAKE_VERSION=3.31.5 # Only used for distros with a system CMake that is too old (< 3.20) RISCV_SAIL_MODEL_VERSION=a214c522a2f98dc3b1f381169d0b1a27bbe0acd8 # Last commit as of May 29, 2025 +set -e # break on error # If run standalone, check environment. Otherwise, use info from main install script if [ -z "$FAMILY" ]; then dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/bin/installation/skywater-lib-install.sh b/bin/installation/skywater-lib-install.sh index 4ab17aa14..b738ce5ba 100755 --- a/bin/installation/skywater-lib-install.sh +++ b/bin/installation/skywater-lib-install.sh @@ -29,6 +29,7 @@ SKYWATER_LIB_VERSION=ac90ef0c622a9377a16b5218d9da3ac4169eeaaf # Last commit as of May 30, 2025 +set -e # break on error # If run standalone, check environment. Otherwise, use info from main install script if [ -z "$FAMILY" ]; then dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/bin/installation/spike-install.sh b/bin/installation/spike-install.sh index 638cee857..9ae538318 100755 --- a/bin/installation/spike-install.sh +++ b/bin/installation/spike-install.sh @@ -29,6 +29,7 @@ SPIKE_VERSION=4c870d063dbbaeb4dc7007fe5c2a1bf8b00a767e # Last commit as of May 30, 2025 +set -e # break on error # If run standalone, check environment. Otherwise, use info from main install script if [ -z "$FAMILY" ]; then dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/bin/installation/verilator-install.sh b/bin/installation/verilator-install.sh index 60601a2f0..504b2a3ee 100755 --- a/bin/installation/verilator-install.sh +++ b/bin/installation/verilator-install.sh @@ -29,6 +29,7 @@ VERILATOR_VERSION=v5.036 # Last release as of May 30, 2025 +set -e # break on error # If run standalone, check environment. Otherwise, use info from main install script if [ -z "$FAMILY" ]; then dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/bin/installation/wally-installation-helper-functions.sh b/bin/installation/wally-installation-helper-functions.sh index b55496e0e..6b4d8c89b 100755 --- a/bin/installation/wally-installation-helper-functions.sh +++ b/bin/installation/wally-installation-helper-functions.sh @@ -27,6 +27,8 @@ ## and limitations under the License. ################################################################################################ +set -e # break on error + ## Helper functions # Error handler error() {