appdwarf/apps/mkrust
Phantop 3ebee5f254 appdwarf: Switch to AppImage standard environmental variables as v3.0
Deprecates $APPDWARF_CMD for $ARGV0, as part of the standard
Also finally removes the separate header, as it seems to
not be needed anymore
2022-06-11 15:05:58 -04:00

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 4s#/#/bin/# $DIR/rust/AppRun
appdwarf $DIR/rust
mv $DIR/rust.sh cargo
rm -rf $DIR/rust*