appdwarf/apps/mkgo

12 lines
326 B
Bash
Executable file

#!/bin/sh
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
DIR=/tmp/appdwarf/go
mkdir -p $DIR
LINK=$(curl -sL https://go.dev/dl | grep -m1 linux | cut -d\" -f4)
curl -L https://go.dev/"$LINK" | tar xz -C$DIR/..
appdwarf -b $DIR/AppRun
sed -i '4i export GOPROXY=direct' $DIR/AppRun
appdwarf $DIR "$@"
mv $DIR.sh go
rm -rf $DIR