mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-11-12 18:03:05 +00:00
27 lines
612 B
Bash
Executable file
27 lines
612 B
Bash
Executable file
#!/bin/bash
|
|
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
|
|
DIR=/tmp/dwarf-portable-executable/rust
|
|
mkdir -p $DIR
|
|
|
|
eopkg fc -o $DIR cargo rust
|
|
unzip -o $DIR/cargo* -d$DIR
|
|
tar xJf $DIR/install.tar.xz -C$DIR
|
|
unzip -o $DIR/rust* -d$DIR
|
|
tar xJf $DIR/install.tar.xz -C$DIR
|
|
rm $DIR/*
|
|
rm -r $DIR/usr/lib64/rustlib/i686-unknown-linux-gnu
|
|
|
|
cat > $DIR/usr/AppRun << 'EOF'
|
|
#!/bin/sh
|
|
HERE=$(dirname $(readlink -f "${0}"))
|
|
export PATH="${HERE}/bin":$PATH
|
|
export LD_LIBRARY_PATH="${HERE}"/lib64:$LD_LIBRARY_PATH
|
|
"${HERE}"/bin/$APPDWARF_CMD $@
|
|
EOF
|
|
|
|
chmod +x $DIR/usr/AppRun
|
|
|
|
appdwarf $DIR/usr
|
|
mv $DIR/usr.sh cargo
|
|
rm -rf $DIR
|