#!/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*