Improve appimage conversion, add vagrant

This commit is contained in:
Phantop 2022-03-29 01:20:53 -04:00
parent e42983169e
commit 54343023d8
4 changed files with 18 additions and 6 deletions

View File

@ -28,9 +28,12 @@ appimage() {
then
chmod +x "$1"
rm -rf squashfs-root
./"$1" --appimage-extract || exit 1
case $1 in
/*) "$1" --appimage-extract || exit 1 ;;
*) ./"$1" --appimage-extract || exit 1 ;;
esac
dwarf squashfs-root "${@:2}"
rm -rf squashfs-root
rm -rf squashfs-root "$1"
mv squashfs-root.sh "$(basename "$1" .AppImage)".sh
else
echo "$1" is not a valid file
@ -82,7 +85,6 @@ do
wget "$2" -O "$file" || exit 1
fi
appimage "$file" "${@:3}"
rm "$file"
exit 0
;;
--)

View File

@ -2,8 +2,9 @@
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
DIR=/tmp/appdwarf/dotnet
mkdir -p $DIR
VER=$(curl https://dotnetcli.azureedge.net/dotnet/Runtime/LTS/latest.version)
curl https://dotnetcli.azureedge.net/dotnet/Runtime/$VER/dotnet-runtime-$VER-linux-x64.tar.gz | tar xz -C$DIR
LINK=https://dotnetcli.azureedge.net/dotnet/Runtime
VER=$(curl $LINK/LTS/latest.version)
curl $LINK/$VER/dotnet-runtime-$VER-linux-x64.tar.gz | tar xz -C$DIR
ln -s dotnet $DIR/AppRun
appdwarf $DIR
mv $DIR.sh dotnet

View File

@ -15,7 +15,7 @@ cat > $JRE/AppRun << 'EOF'
HERE=$(dirname $(readlink -f "${0}"))
export LD_LIBRARY_PATH="${HERE}":$PATH
"${HERE}"/bin/java $@
rm -r ~/javasharedresources
rm -rf ~/javasharedresources
EOF
chmod +x $JRE/AppRun

9
apps/mkvagrant Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
PATH=$(dirname "$(readlink -f "${0}")")/..:$PATH
DIR=/tmp/appdwarf
mkdir -p $DIR
LINK=https://releases.hashicorp.com/vagrant
VER=$(curl -L $LINK | grep -m1 'href.*[0-9]' | cut -d/ -f3)
LINK2=https://releases.hashicorp.com/vagrant/$VER/vagrant_"$VER"_linux_amd64.zip
curl "$LINK2" | bsdtar xf - -C$DIR
appdwarf -a $DIR/vagrant