2022-04-13 21:10:51 +00:00
|
|
|
#!/bin/sh
|
|
|
|
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
|
2022-03-24 22:25:24 +00:00
|
|
|
DIR=/tmp/appdwarf
|
2022-04-13 21:10:51 +00:00
|
|
|
ARCH=x86_64-unknown-linux-gnu
|
2022-01-01 18:11:03 +00:00
|
|
|
mkdir -p $DIR
|
2022-04-13 21:10:51 +00:00
|
|
|
LINK=https://static.rust-lang.org/dist/rust-nightly-$ARCH.tar.gz
|
2022-01-01 18:11:03 +00:00
|
|
|
curl -L $LINK | tar xz -C$DIR
|
|
|
|
|
2022-01-02 05:18:37 +00:00
|
|
|
mkdir $DIR/rust
|
2022-04-13 21:10:51 +00:00
|
|
|
for i in cargo rustc rust-std-$ARCH/; do
|
|
|
|
mv "$DIR/rust-nightly-$ARCH/$i"/* $DIR/rust; done
|
2022-01-01 18:11:03 +00:00
|
|
|
|
2022-04-13 21:10:51 +00:00
|
|
|
cp "$(dirname "$(readlink -f "${0}")")"/../AppRun $DIR/rust
|
2022-06-11 19:02:34 +00:00
|
|
|
sed -i 4s#/#/bin/# $DIR/rust/AppRun
|
2022-01-01 18:11:03 +00:00
|
|
|
|
|
|
|
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*
|