apps: refactor appmk infrastructure into sourcing appdwarf

This commit is contained in:
Phantop 2024-07-04 23:22:20 -04:00
parent 2addf3728f
commit e268a141b2
23 changed files with 163 additions and 184 deletions

View file

@ -55,7 +55,7 @@ jobs:
matrix:
app:
- { name: wine, pkgs: dxvk-async-git mono vkd3d-proton-mingw-git wine-gecko wine-mono wine-staging-wow64 winetricks }
- { name: emus, pkgs: ares-emu-avx-git cemu citra-canary-git ryujinx yuzu-early-access }
- { name: emus, pkgs: ares-emu-avx-git cemu citra-canary-git ryujinx suyu-dev-qt6-git }
runs-on: ubuntu-latest
container: archlinux:latest
steps:

108
appdwarf
View file

@ -2,17 +2,46 @@
set -e # exit on failure
IFS=$(printf '\n\t') # smarter ifs
appmk() {
appdwarf "$DIR"
mv "$DIR".sh bin/"$APP"
rm -rf "$DIR"
}
apprun() {
export PATH="$APPDIR"/bin:"$PATH"
export LD_LIBRARY_PATH="$APPDIR"/lib64:"$APPDIR"/lib:"$LD_LIBRARY_PATH"
exec "$APPDIR/$(basename "$ARGV0")" "$@"
}
arun() {
outfunc apprun > "$1"
chmod +x "$1"
}
brun() {
outfunc apprun | sed '5s#/#/bin/#' > "$1"
chmod +x "$1"
}
appa() { arun "$DIR"/AppRun; }
appb() { brun "$DIR"/AppRun; }
unarc() { curl -L "$LINK" | bsdtar xf - -C"$DIR"; }
unbz() { curl -L "$LINK" | tar xj -C"$DIR"; }
ungz() { curl -L "$LINK" | tar xz -C"$DIR"; }
unxz() { curl -L "$LINK" | tar xJ -C"$DIR"; }
un7z() {
aria2c "$LINK" -d "$DIR" -o "$1"
7z x -y -o"$DIR" "$DIR"/"$1"
}
bundlehead() {
MOUNTBIN=$(mktemp) # use provided offsets to supply dwarfs binary
tail -n+"$OFF" "$0" | head -n"$LEN" | head -c-1 | zstd -cqd > "$MOUNTBIN"
mountbin=$(mktemp) # use provided offsets to supply dwarfs binary
#shellcheck disable=SC2154
tail -n+"$off" "$0" | head -n"$len" | head -c-1 | zstd -cqd > "$mountbin"
#shellcheck disable=SC2317
dwarfs() { chmod +x "$MOUNTBIN"; "$MOUNTBIN" "$@"; rm "$MOUNTBIN"; }
dwarfs() { chmod +x "$mountbin"; "$mountbin" "$@"; rm "$mountbin"; }
}
header() {
@ -42,7 +71,7 @@ zzexe() {
[ "$1" = "-p" ] && p="$2" && shift # save prefix if present
shift; out=$(mktemp) # make tmp file to avoid io operations
{ outfunc
echo "OFF=$(($( (outfunc; outfunc zzexe_header) | wc -l)+2))"
echo "off=$(($( (outfunc; outfunc zzexe_header) | wc -l)+2))"
outfunc zzexe_header | sed -e "3s/)$/${1##*[./]})/" -e "8s/^/$p /"
zstdmt -cq19 "$@"
} > "$out"
@ -53,7 +82,7 @@ zzexe() {
zzexe_header() {
dir="$(dirname "$0")" out=$(mktemp -t .zzXXXX.)
tail -n+"$OFF" "$0" | zstd -cd > "$out"
tail -n+"$off" "$0" | zstd -cd > "$out"
chmod +x "$out"
[ ! -f "$dir/$(basename "$out")" ] && ln -s "$out" "$dir"
trap 'rm -f "$out" "$dir/$(basename "$out")"' 0 1 2 3 6 14 15 EXIT
@ -61,35 +90,47 @@ zzexe_header() {
exit $?
}
if [ "$SOURCE" ]; then
unset SOURCE
trap 'rm -rf "$DIR"' 0 1 2 3 6 14 15 EXIT
APP=$(basename "$0" | sed 's/^mk//')
DIR=/tmp/appdwarf/$APP
mkdir -p "$DIR"
return
fi
case "$1" in
-a )
outfunc apprun > "$2"
chmod +x "$2"
arun "$2"
exit ;;
-b )
outfunc apprun | sed '5s#/#/bin/#' > "$2"
chmod +x "$2"
brun "$2"
exit ;;
--bundle ) # allow bundling dwarfs binary
BUNDLE=$(realpath "$2")
bundle=$(realpath "$2")
shift 2;;
-d | --decompress )
d=dwarfs-root # just to keep line shorter, extract if file is dwarfs
dwarfsck -d0 -i"$2" && mkdir $d && dwarfsextract -o $d -i "$2" && exit
tmp=$(mktemp) # make tmp file to avoid io operations
unappimage "$2" && exit # also extract appimages cuz we can
tail -n+"$(sed -n '3s/^OFF=//p' "$2")" "$2" | zstd -cd > "$tmp"
tail -n+"$(sed -n '3s/^off=//p' "$2")" "$2" | zstd -cd > "$tmp"
mv "$tmp" "$2"
chmod +x "$2"
exit ;;
-f | --fetch )
FETCH=1
fetch=1
shift ;;
-g | --get )
gh run -R phantop/appdwarf download -n "$2"
file="$(echo "$2" | sed 's/^arch-//')"
chmod +x "$file"
exit ;;
-p | -z | --prefix | --zzexe )
zzexe "$@" ;;
--version | -v )
printf '\e[32m'
echo 'appdwarf 2023.11.16'
echo 'appdwarf 2024.07.04'
printf '\e[36m'
echo Built by July 🏳️‍🌈
printf '\e[0m'
@ -102,6 +143,7 @@ case "$1" in
echo
echo " --bundle [path/to/dwarfs] bundle dwarfs with the appdwarf image"
echo " -f, --fetch only fetch a remote AppImage"
echo " -g, --get download a prebuild appdwarf from actions"
echo
echo " -p, --prefix [PREFIX] zzexe a file with prefix"
echo " -z, --zzexe zzexe a file"
@ -127,16 +169,16 @@ if [ ! -d "$1" ]; then # directory doesn't exist, see if this is an appimage
echo "Assuming this is a GitHub repo..."
app="$(echo "${1%/}"/releases | sed 's|github.com|api.github.com/repos|')"
api="$(curl "$app" | jq -r .[].assets[].browser_download_url | grep 'AppImage$')"
link="$(echo "$api" | grep "$(uname -m)" || echo "$api" | grep -vEe '-(aarch|arm)(64|hf)\.AppImage')"
url="$(echo "$api" | grep "$(uname -m)" || echo "$api" | grep -vEe '-(aarch|arm)(64|hf)\.AppImage')"
shift
set -- "$(echo "$link" | head -n1)" "$@"
set -- "$(echo "$url" | head -n1)" "$@"
fi
app=$(basename "$1") # actually try to get the appimage
if aria2c -x16 -s16 "$1" -o "$app" || wget "$1" -O "$app"; then
shift
set -- "$app" "$@"
test "$FETCH" && chmod +x "$1" && exit
test "$fetch" && chmod +x "$1" && exit
else
printf '\e[31m' >&2
echo "No valid remote or local input found. Exiting..." >&2
@ -160,22 +202,22 @@ if [ ! -d "$1" ]; then # directory doesn't exist, see if this is an appimage
printf '\e[0m'
zzexe -z "$@"
fi
fi
fi
head="$(mktemp)"
if [ "$BUNDLE" ]; then { # behavior for bundling a dwarfs executable
ZDATA="$(mktemp)"
zstd -cq "$BUNDLE" > "$ZDATA"
outfunc
echo "OFF=$(($( (outfunc; outfunc bundlehead; outfunc header) | wc -l)+3))"
echo "LEN=$(($(wc -l < "$ZDATA")+1))"
outfunc bundlehead
} > "$head"
fi
outfunc header >> "$head"
test "$BUNDLE" && cat "$ZDATA" >> "$head"
echo >> "$head"
head="$(mktemp)"
if [ "$bundle" ]; then { # behavior for bundling a dwarfs executable
zdata="$(mktemp)"
zstd -cq "$bundle" > "$zdata"
outfunc
echo "off=$(($( (outfunc; outfunc bundlehead; outfunc header) | wc -l)+3))"
echo "len=$(($(wc -l < "$zdata")+1))"
outfunc bundlehead
} > "$head"
fi
outfunc header >> "$head"
test "$bundle" && cat "$zdata" >> "$head"
echo >> "$head"
mkdwarfs -o "$(realpath "$1").sh" -B5 --header "$head" -i "$@" --categorize=pcmaudio -C pcmaudio/waveform::flac:level=8
rm -rf "$head" "$1"
chmod +x "$(realpath "$1").sh"
mkdwarfs -o "$(realpath "$1").sh" -B5 --header "$head" -i "$@" --categorize=pcmaudio -C pcmaudio/waveform::flac:level=8
rm -rf "$head" "$1"
chmod +x "$(realpath "$1").sh"

View file

@ -11,18 +11,16 @@ These scripts are all targeted for use on x86_64 Linux systems with GLIBC.
Script | Function | Source
--- | --- | ---
`mkdotnet` | Latest LTS .NET runtime <https://dotnet.microsoft.com>
`mkeopkg` | Converts the given Solus package(s) to an appdwarf | <https://getsol.us>
`mkgo` | Latest official Go release | <https://go.dev>
`mkjava` | Accepts an argument for Java version and obtains that build from Adoptium | <https://adoptium.net>
`mkmp3tag` | Latest 64-bit Mp3tag release | <https://mp3tag.de/en>
`mkmusikcube` | Latest musikcube release | <https://musikcube.com/>
`mkmusl` | Latest musl.cc toolchain | <https://musl.cc>
`mknode` | Latest official NodeJS release | <https://nodejs.org>
`mkpacman` | Converts the given Arch package(s) to an appdwarf | <https://archlinux.org>
`mkpypy` | Latest PyPy3 release | <https://www.pypy.org>
`mkrenpy` | Latest Ren'Py release | <https://www.renpy.org>
`mkrust` | Latest Rust nightly | <https://rust-lang.org>
`mksignal` | Latest Signal stable from the Solus repos (requires `eopkg` and may not work on other distros) | <https://signal.org>
`mktex` | Minimal/custom TeX Live image | <https://ctan.org>
`mkwine` | Latest `wine-staging-tkg` release | <https://github.com/Kron4ek/Wine-Builds>
`mkwine proton` | GloriousEggroll Proton Builds | <https://github.com/GloriousEggroll/proton-ge-custom>
`rustsolus` | Latest Rust stable from the Solus repos (requires `eopkg` and may not work on other distros) | <https://getsol.us>

View file

@ -1,42 +0,0 @@
#!/bin/sh
set -e # exit on failure
IFS=$(printf '\n\t') # smarter ifs
trap 'rm -rf "$DIR"' 0 1 2 3 6 14 15 EXIT
part0() { # dir setup
APP=$(basename "$0" | sed 's/^mk//')
DIR=/tmp/appdwarf/$APP
mkdir -p "$DIR"
}
ungz() { # default decomps
curl -L "$LINK" | tar xz -C"$DIR"
}
unbz() {
curl -L "$LINK" | tar xj -C"$DIR"
}
unxz() {
curl -L "$LINK" | tar xJ -C"$DIR"
}
unarc() {
curl -L "$LINK" | bsdtar xf - -C"$DIR"
}
appa() { # default appruns
appdwarf -a "$DIR"/AppRun
}
appb() {
appdwarf -b "$DIR"/AppRun
}
part9() { # ending bit
appdwarf "$DIR"
mv "$DIR".sh bin/"$APP"
rm -rf "$DIR"
}

View file

@ -2,7 +2,5 @@
set -e # exit on failure
IFS=$(printf '\n\t') # smarter ifs
gh run download -n "$1"
file="$(echo "$1" | sed 's/^arch-//')"
chmod +x "$file"
mv "$file" "$(dirname "$(realpath "$0")")/bin"
cd "$(dirname "$(realpath "$0")")/bin"
appdwarf -g "$1"

View file

@ -1,10 +1,10 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
base=https://download.calibre-ebook.com
LINK="$(curl "$base" | tail -n 1 | cut -d\" -f2)"
LINK="$(curl "$base/$LINK" | tail -n 1 | cut -d\" -f4 | tr -d /)"
LINK="$base/$LINK/calibre-$LINK-$(uname -m).txz"
unxz
appa
part9
appmk

View file

@ -1,6 +1,6 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
TYPE=Runtime
VER=LTS
@ -16,9 +16,20 @@ done
LINK=https://dotnetcli.azureedge.net/dotnet/$TYPE
VER=$(curl $LINK/"$VER"/latest.version)
TYPE=$(echo "$TYPE" | tr "[:upper:]" "[:lower:]")
VER=$(curl $LINK/"$VER"/latest.version)
LINK="$LINK/$VER/dotnet-$TYPE-$VER-linux-x64.tar.gz"
ungz
ln -s dotnet "$DIR"/AppRun
part9
apprun() {
export DOTNET_ROOT="$APPDIR"
case "$(basename "$ARGV0")" in
dotnetenv )
exec "$@" ;;
* )
exec "$APPDIR/$(basename "$ARGV0")" "$@" ;;
esac
}
appa
appmk

View file

@ -1,10 +0,0 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
APP="$1"
eopkg fc -o "$DIR" "$@"
parallel "unzip -op {} install.tar.xz | tar xJf - -C$DIR" ::: "$DIR"/*.eopkg
rm "$DIR"/*.eopkg
appb
sed -i 3,5s#/bin#/usr/bin# "$DIR"/AppRun
part9

View file

@ -1,8 +1,8 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
LINK=$(curl https://go.dev/dl/ | grep -m1 linux | cut -d\" -f4)
curl -L https://go.dev/"$LINK" | tar xz -C"$DIR"/..
appb
sed -i '5i export GOPROXY=direct' "$DIR"/AppRun
part9
appmk

View file

@ -1,6 +1,6 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
TYPE=jre
VER=21
@ -15,8 +15,7 @@ while [ $# -gt 0 ]; do
done
LINK=https://api.adoptium.net/v3/binary/latest/$VER/ga/linux/x64/"$TYPE"/hotspot/normal/eclipse
echo $LINK
ungz
mv "$DIR"/jdk*/* "$DIR"
appb
part9
appmk

View file

@ -1,10 +1,9 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
LINK=$(curl -L mp3tag.de/dodownload64.html | awk -F'[="]' /URL/'{print $7}')
aria2c "$LINK" -d "$DIR" -o mp3tag
7z x -y -o"$DIR" "$DIR"/mp3tag
un7z mp3tag
mv "$DIR"/Mp3tag.exe "$DIR"/mp3tag
appa
sed -i '5s/ / wine /' "$DIR"/AppRun
part9
appmk

View file

@ -1,8 +1,8 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
LINK=$(curl https://api.github.com/repos/clangen/musikcube/releases | grep -om1 'http.*_64.*bz2')
unbz
mv "$DIR"/musikcube*/* "$DIR"
appa
part9
appmk

View file

@ -1,10 +1,10 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
LINK=http://musl.cc/x86_64-linux-musl-native.tgz
ungz
mv "$DIR"/x86_64-linux-musl-native/* "$DIR"
ln -s gcc "$DIR"/bin/cc
appa
sed -i '5d;4a exec "$@"' "$DIR"/AppRun
part9
appmk

View file

@ -1,9 +1,9 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
LINK=https://nodejs.org/dist/latest/
LINK=$LINK$(curl $LINK | grep linux-x64.tar.xz | cut -d\" -f2)
unxz
mv "$DIR"/node*/* "$DIR"
appb
part9
appmk

View file

@ -1,6 +1,6 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
APP="$1"
sudo pacman -Sw --cachedir "$DIR" --noconfirm "$@"
parallel "tar xf {} -C$DIR" ::: "$DIR"/*.tar.zst
@ -8,4 +8,4 @@ rm -f "$DIR"/*.tar.zst*
appb
sed -i 4s#/lib#/usr/lib#g "$DIR"/AppRun
sed -i 3,5s#/bin#/usr/bin# "$DIR"/AppRun
part9
appmk

View file

@ -1,6 +1,6 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
API=/repos/PintaProject/Pinta/actions/artifacts
QUERY='.artifacts[] | select(.name == "Pinta-linux-dotnet-8.0.x.zip") | .archive_download_url'
LINK=$(gh api $API -q "$QUERY" | head -n1)
@ -8,4 +8,4 @@ gh api "$LINK" | bsdtar xf - -C"$DIR"
bsdtar xf "$DIR"/*.zip -C"$DIR"
rm "$DIR"/*.zip
appa
part9
appmk

View file

@ -1,10 +1,10 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
LINK="$(curl https://www.pypy.org/download.html | grep http.\*linux64.tar.bz2 | head -n1 | cut -d\" -f4)"
unbz
mv "$DIR"/pypy*/* "$DIR"
"$DIR"/bin/pypy -m ensurepip
"$DIR"/bin/pypy -m pip install pipx
appb
part9
appmk

View file

@ -1,12 +1,11 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
LINK=$(curl https://www.renpy.org/latest.html | grep 7z | cut -d\" -f2)
aria2c "$LINK" -d "$DIR" -o renpy.exe
7z x -y -o"$DIR" "$DIR"/renpy.exe
un7z renpy.exe
mkdir "$DIR"/lib
mv "$DIR"/renpy-*/lib/py3-linux-x86_64 "$DIR"/renpy-*/lib/python* "$DIR"/lib
mv "$DIR"/renpy-*/renpy* "$DIR"
rm -r "$DIR"/*.exe "$DIR"/renpy-* "$DIR/renpy.app"
ln -s renpy.sh "$DIR/AppRun"
part9
appmk

View file

@ -1,10 +1,10 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
ARCH=x86_64-unknown-linux-gnu
LINK=https://static.rust-lang.org/dist/rust-nightly-$ARCH.tar.gz
ungz
"$DIR"/rust-nightly-$ARCH/install.sh --prefix="$DIR" --components=cargo,rustc,rust-std-$ARCH
rm -rf "$DIR"/rust-nightly-$ARCH
appb
part9
appmk

View file

@ -1,8 +0,0 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
eopkg fc -o "$DIR" signal-desktop
parallel "unzip -op {} install.tar.xz | tar xJf - -C$DIR" ::: "$DIR"/*.eopkg
ln -s usr/share/signal-desktop/signal-desktop "$DIR"/AppRun
rm "$DIR"/*.eopkg
part9

View file

@ -1,6 +1,6 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
LINK=https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
ungz
mv "$DIR"/install-tl-* "$DIR"/tl
@ -39,8 +39,8 @@ tlpdbopt_sys_man /usr/local/share/man
tlpdbopt_w32_multi_user 1
EOF
"$DIR"/tl/install-tl -profile "$DIR"/tl/prof
rm -r "$DIR"/texmf-dist/scripts/tlcockpit
"$DIR"/bin/x86_64-linux/tlmgr install bookhands fontawesome5 markdown paralist titlesec titling xstring soul
rm -r "$DIR"/texmf-dist/scripts/tlcockpit
appb
sed -i 3,5s#/bin#/bin/x86_64-linux# "$DIR"/AppRun
part9
appmk

View file

@ -1,38 +1,40 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
# shellcheck source=../appdwarf
SOURCE=1 . "$(which appdwarf)"
VER=Kron4ek/Wine-Builds
[ "$1" = "-p" ] && PREFIX=1 && shift
[ "$1" = "proton" ] && VER=GloriousEggroll/proton-ge-custom && shift
[ "$1" = "lutris" ] && VER=lutris/wine && shift
[ "$1" = "proton" ] && VER=GloriousEggroll/proton-ge-custom && shift
LINK=$(curl -L api.github.com/repos/$VER/releases | jq .[0].assets[1] | grep -om1 git.\*tar..z)
unarc
mv "$DIR"/wine*/* "$DIR"/GE-Proton*/files/* "$DIR"/lutris*/* "$DIR" || true
t=winetricks; wget -O"$DIR"/bin/$t github.com/$t/$t/raw/master/src/$t
chmod +x "$DIR"/bin/$t
rm -r "$DIR"/lib/wine/i386*
appb
t=winetricks
wget -O"$DIR"/bin/$t github.com/$t/$t/raw/master/src/$t
chmod +x "$DIR"/bin/$t
apprun() {
export PATH="$APPDIR"/bin:"$PATH"
export LD_LIBRARY_PATH="$APPDIR"/lib64:"$APPDIR"/lib:"$LD_LIBRARY_PATH"
if [ ! "$WINEPREFIX" ]; then
mkdir -p "$APPDIR.prefix" ~/.wine/work
fuse-overlayfs -o "lowerdir=$APPDIR/prefix,upperdir=$HOME/.wine,workdir=$HOME/.wine/work" "$APPDIR.prefix"
export WINEPREFIX="$APPDIR.prefix"
fi
"$APPDIR/bin/$(basename "$ARGV0")" "$@"
fusermount -quz "$APPDIR.prefix"
rmdir "$APPDIR.prefix"
}
if [ "$PREFIX" ]; then
WINEPREFIX="$DIR/prefix" "$DIR/bin/wine" cmd /c exit
cat > "$DIR/AppRun" << 'EOF'
#!/bin/sh
export PATH="$APPDIR"/bin:"$PATH"
export LD_LIBRARY_PATH="$APPDIR"/lib64:"$APPDIR"/lib:"$LD_LIBRARY_PATH"
if [ ! $WINEPREFIX ]; then
mkdir -p "$APPDIR.prefix" ~/.wine/work
fuse-overlayfs -o "lowerdir=$APPDIR/prefix,upperdir=$HOME/.wine,workdir=$HOME/.wine/work" "$APPDIR.prefix"
export WINEPREFIX="$APPDIR.prefix"
fi
"$APPDIR/bin/$(basename "$ARGV0")" "$@"
fusermount -quz "$APPDIR.prefix"
rmdir "$APPDIR.prefix"
EOF
chmod +x "$DIR/AppRun"
else
appb
fi
part9
appmk

View file

@ -1,9 +0,0 @@
#!/bin/sh
. "$(dirname "$0")"/appmk
part0
eopkg fc -o "$DIR" cargo rust
parallel "unzip -op {} install.tar.xz | tar xJf - -C$DIR" ::: "$DIR"/*.eopkg
rm -r "$DIR"/usr/lib64/rustlib/i686-unknown-linux-gnu "$DIR"/*.eopkg
mv "$DIR"/usr/* "$DIR"
appb
part9