appdwarf/apps/mkgo

12 lines
331 B
Bash
Executable file

#!/bin/sh
APP=$(basename "$0" | sed 's/^mk//')
DIR=/tmp/appdwarf/$APP
mkdir -p "$DIR"
LINK=$(curl 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 "$APP"
rm -rf "$DIR"