From 04a22777912d86df30ab730e6c482c8921b57088 Mon Sep 17 00:00:00 2001 From: Niklaus Schiess Date: Wed, 5 Oct 2022 12:49:27 +0200 Subject: [PATCH] Updated install build compiler script --- build/02_install_build_compiler.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/build/02_install_build_compiler.sh b/build/02_install_build_compiler.sh index 7e6fd97..bb70c9e 100755 --- a/build/02_install_build_compiler.sh +++ b/build/02_install_build_compiler.sh @@ -1,4 +1,10 @@ #!/bin/bash + +function die(){ + echo "$1" + exit 1 +} + if [ $# -ne 1 ];then echo "Missing arch" exit 1 @@ -20,7 +26,8 @@ case $ARCH in ;; esac HOST=http://musl.cc +echo "Fetching ${HOST}/${ARCH}-cross.tgz" cd / -curl -so ${ARCH}-cross.tgz ${HOST}/${ARCH}-cross.tgz -tar -xf ${ARCH}-cross.tgz -rm ${ARCH}-cross.tgz \ No newline at end of file +curl -so ${ARCH}-cross.tgz ${HOST}/${ARCH}-cross.tgz || die "Failed to download build compiler package" +tar -xf ${ARCH}-cross.tgz || die "Failed to extract build compiler package" +rm ${ARCH}-cross.tgz || die "Failed to remove build compiler package" \ No newline at end of file