Updated install build compiler script

This commit is contained in:
Niklaus Schiess 2022-10-05 12:49:27 +02:00
parent ecf0f96df9
commit 04a2277791

View file

@ -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
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"