mirror of
https://github.com/Phantop/appdwarf.git
synced 2025-01-09 05:37:04 +00:00
15 lines
390 B
Bash
Executable file
15 lines
390 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/..
|
|
|
|
cp "$(dirname "$(readlink -f "${0}")")"/../AppRun $DIR
|
|
sed -i '4i export GOPROXY=direct' $DIR/AppRun
|
|
sed -i 5s#/#/bin/# $DIR/AppRun
|
|
|
|
appdwarf $DIR "$@"
|
|
mv $DIR.sh go
|
|
rm -rf $DIR
|