rust: smaller size and solus version (small)

This commit is contained in:
Phantop 2022-01-02 00:18:37 -05:00
parent 4d1b4358d5
commit e3bbef6c98
3 changed files with 31 additions and 4 deletions

View file

@ -1,5 +1,5 @@
#!/bin/bash
LINK1=https://raw.githubusercontent.com/AppImage/appimage.github.io/master/apps/$1.md
LINK2="$(curl $LINK1 | grep -o https.\*releases | sed 's|github.com|api.github.com/repos|')"
LINK3="$(curl $LINK2 | grep -om1 https.\*AppImage)"
LINK3="$(curl $LINK2 | grep -v arm64 | grep -om1 https.\*AppImage)"
appdwarf -u $LINK3

View file

@ -5,17 +5,18 @@ 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=/
mkdir $DIR/rust
cp -r $DIR/rust*/{cargo,rustc,rust-std*}/* $DIR/rust
cat > $DIR/rust/AppRun << 'EOF'
#!/bin/sh
HERE=$(dirname $(readlink -f "${0}"))
export LD_LIBRARY_PATH="${HERE}":$PATH
export PATH="${HERE}/bin":$PATH
"${HERE}"/bin/$APPDWARF_CMD $@
EOF
chmod +x $DIR/rust/AppRun
appdwarf $DIR/rust
mv $DIR/rust.sh rustc
mv $DIR/rust.sh cargo
rm -rf $DIR/rust*

26
apps/rustsolus Executable file
View file

@ -0,0 +1,26 @@
#!/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