appdwarf/apps/mkgo

15 lines
390 B
Plaintext
Raw Normal View History

#!/bin/sh
2022-01-14 18:41:46 +00:00
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
2022-06-27 00:53:01 +00:00
DIR=/tmp/appdwarf/go
2021-05-15 21:50:14 +00:00
mkdir -p $DIR
2022-06-27 00:53:01 +00:00
LINK=$(curl -sL https://go.dev/dl | grep -m1 linux | cut -d\" -f4)
curl -L https://go.dev/"$LINK" | tar xz -C$DIR/..
2021-05-15 21:50:14 +00:00
2022-06-27 00:53:01 +00:00
cp "$(dirname "$(readlink -f "${0}")")"/../AppRun $DIR
sed -i '4i export GOPROXY=direct' $DIR/AppRun
sed -i 5s#/#/bin/# $DIR/AppRun
2021-05-15 21:50:14 +00:00
2022-06-27 00:53:01 +00:00
appdwarf $DIR "$@"
mv $DIR.sh go
rm -rf $DIR