2022-01-01 18:11:03 +00:00
|
|
|
#!/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
|
|
|
|
|
2022-01-02 05:18:37 +00:00
|
|
|
mkdir $DIR/rust
|
|
|
|
cp -r $DIR/rust*/{cargo,rustc,rust-std*}/* $DIR/rust
|
2022-01-01 18:11:03 +00:00
|
|
|
|
|
|
|
cat > $DIR/rust/AppRun << 'EOF'
|
|
|
|
#!/bin/sh
|
|
|
|
HERE=$(dirname $(readlink -f "${0}"))
|
2022-01-02 05:18:37 +00:00
|
|
|
export PATH="${HERE}/bin":$PATH
|
2022-01-01 18:11:03 +00:00
|
|
|
"${HERE}"/bin/$APPDWARF_CMD $@
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x $DIR/rust/AppRun
|
|
|
|
|
|
|
|
appdwarf $DIR/rust
|
2022-01-02 05:18:37 +00:00
|
|
|
mv $DIR/rust.sh cargo
|
2022-01-01 18:11:03 +00:00
|
|
|
rm -rf $DIR/rust*
|