mirror of
https://github.com/Phantop/appdwarf.git
synced 2025-07-16 17:02:52 +00:00
22 lines
538 B
Bash
Executable file
22 lines
538 B
Bash
Executable file
#!/bin/bash
|
|
PATH=$(dirname $(readlink -f "${0}"))/..:$PATH
|
|
DIR=/tmp/dwarf-portable-executable
|
|
mkdir -p $DIR
|
|
LINK=https://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz
|
|
curl -L $LINK | tar xz -C$DIR
|
|
|
|
$DIR/rust*/install.sh --destdir=$DIR/rust --without=rust-docs --prefix=/
|
|
|
|
cat > $DIR/rust/AppRun << 'EOF'
|
|
#!/bin/sh
|
|
HERE=$(dirname $(readlink -f "${0}"))
|
|
export LD_LIBRARY_PATH="${HERE}":$PATH
|
|
"${HERE}"/bin/$APPDWARF_CMD $@
|
|
EOF
|
|
|
|
chmod +x $DIR/rust/AppRun
|
|
|
|
appdwarf $DIR/rust
|
|
mv $DIR/rust.sh rustc
|
|
rm -rf $DIR/rust*
|