appdwarf/apps/mkgo
Phantop 3ebee5f254 appdwarf: Switch to AppImage standard environmental variables as v3.0
Deprecates $APPDWARF_CMD for $ARGV0, as part of the standard
Also finally removes the separate header, as it seems to
not be needed anymore
2022-06-11 15:05:58 -04:00

15 lines
404 B
Bash
Executable file

#!/bin/sh
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
DIR=/tmp/appdwarf
mkdir -p $DIR
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
cp "$(dirname "$(readlink -f "${0}")")"/../AppRun $DIR/go
sed -i '4i export GOPROXY=direct' $DIR/go/AppRun
sed -i 4s#/#/bin/# $DIR/go/AppRun
appdwarf $DIR/go
mv $DIR/go.sh go
rm -rf $DIR/go