appdwarf/apps/mkrust

19 lines
485 B
Bash
Executable file

#!/bin/sh
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
DIR=/tmp/appdwarf
ARCH=x86_64-unknown-linux-gnu
mkdir -p $DIR
LINK=https://static.rust-lang.org/dist/rust-nightly-$ARCH.tar.gz
curl -L $LINK | tar xz -C$DIR
mkdir $DIR/rust
for i in cargo rustc rust-std-$ARCH/; do
mv "$DIR/rust-nightly-$ARCH/$i"/* $DIR/rust; done
cp "$(dirname "$(readlink -f "${0}")")"/../AppRun $DIR/rust
sed -i 5s#/#/bin/# $DIR/rust/AppRun
appdwarf $DIR/rust
mv $DIR/rust.sh cargo
rm -rf $DIR/rust*