From 6952b67c8946b569e908c8ad71dbe1c8b7a9410a Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 21 Nov 2022 10:10:31 -0800 Subject: [PATCH] Stop build script upon first error --- util/build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/util/build.sh b/util/build.sh index 42825db..2053641 100755 --- a/util/build.sh +++ b/util/build.sh @@ -1,11 +1,12 @@ #!/usr/bin/env bash -# Copyright 2021 The Hush Developers +# Copyright 2021-2022 Duke Leto and The Hush Developers # Distributed under the GPLv3 software license, see the accompanying # file LICENSE or https://www.gnu.org/licenses/gpl-3.0.en.html - # Purpose: Script to build Hush lightwalletd on x86 64-bit arch - # Check if go is installed on system and exits if it is not + +set -e + if ! [ -x "$(command -v go)" ]; then echo 'Error: go is not installed. Install go and try again.' >&2 exit 1