appdwarf/apps/mkgo

15 lines
404 B
Plaintext
Raw Normal View History

#!/bin/sh
2022-01-14 18:41:46 +00:00
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
DIR=/tmp/appdwarf
2021-05-15 21:50:14 +00:00
mkdir -p $DIR
2022-03-25 22:40:58 +00:00
LINK=$(curl -sL https://go.dev/dl | grep -om1 dl/go.\*linux-amd64.tar.gz)
curl -L https://go.dev/"$LINK" | tar xz -C$DIR
2021-05-15 21:50:14 +00:00
cp "$(dirname "$(readlink -f "${0}")")"/../AppRun $DIR/go
sed -i '4i export GOPROXY=direct' $DIR/go/AppRun
sed -i 5s#/#/bin/# $DIR/go/AppRun
2021-05-15 21:50:14 +00:00
appdwarf $DIR/go
mv $DIR/go.sh go
2021-05-15 21:50:14 +00:00
rm -rf $DIR/go