mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-11-10 00:46:30 +00:00
20 lines
434 B
Bash
Executable file
20 lines
434 B
Bash
Executable file
#!/bin/bash
|
|
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
|
|
DIR=/tmp/appdwarf
|
|
mkdir -p $DIR
|
|
curl http://musl.cc/x86_64-linux-musl-native.tgz | tar xz -C$DIR
|
|
mv $DIR/x86_64-linux-musl-native $DIR/musl
|
|
ln -s gcc $DIR/musl/bin/cc
|
|
|
|
cat > $DIR/musl/AppRun << 'EOF'
|
|
#!/bin/sh
|
|
HERE=$(dirname $(readlink -f "${0}"))
|
|
export PATH="${HERE}/bin":$PATH
|
|
"$@"
|
|
EOF
|
|
chmod +x $DIR/musl/AppRun
|
|
|
|
appdwarf $DIR/musl
|
|
mv $DIR/musl.sh musl
|
|
rm -rf $DIR/musl
|