mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-11-10 08:54:54 +00:00
20 lines
457 B
Bash
Executable file
20 lines
457 B
Bash
Executable file
#!/bin/bash
|
|
PATH=$(dirname $(readlink -f "${0}"))/..:$PATH
|
|
DIR=/tmp/dwarf-portable-executable
|
|
mkdir -p $DIR
|
|
LINK=$(curl -sL https://golang.org/dl | grep -wo dl/go.\*linux-amd64.tar.gz | head -n1)
|
|
curl -L https://golang.org/$LINK | tar xz -C$DIR
|
|
|
|
cat > $DIR/go/AppRun << 'EOF'
|
|
#!/bin/sh
|
|
HERE=$(dirname $(readlink -f "${0}"))
|
|
export LD_LIBRARY_PATH="${HERE}":$PATH
|
|
"${HERE}"/bin/go $@
|
|
EOF
|
|
|
|
chmod +x $DIR/go/AppRun
|
|
|
|
appdwarf $DIR/go
|
|
mv go.sh go
|
|
rm -rf $DIR/go
|