mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-11-18 04:43:17 +00:00
rust: smaller size and solus version (small)
This commit is contained in:
parent
4d1b4358d5
commit
e3bbef6c98
|
@ -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
|
||||
|
|
|
@ -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
26
apps/rustsolus
Executable 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
|
Loading…
Reference in a new issue