appdwarf: ditch single mountpoint outright

this seemed like a cool idea but i also barely use it because of
its issues anyways
This commit is contained in:
Phantop 2022-11-14 16:43:24 -05:00
parent 51d60260cb
commit e05f9223d0

View file

@ -8,18 +8,15 @@ apprun() {
exec "$APPDIR/$(basename "$ARGV0")" "$@"
}
# shellcheck disable=SC2086,SC2155
header() {
APPDIR="/tmp/dwarf_$(realpath "$0" | sed 's#/#_#g')"
export APPDIR APPIMAGE="$(realpath "$0")" ARGV0="$0" OWD="$PWD"
args="-o offset=auto -o tidy_strategy=swap -o workers=4"
[ ! -d "$APPDIR" ] && mkdir "$APPDIR" && dwarfs $args "$0" "$APPDIR" 2>/dev/null
trap 'fusermount -quz $APPDIR' 0 1 2 3 6 14 15 EXIT
set -e
APPDIR=$(mktemp -d)
APPIMAGE="$(realpath "$0")"
export APPDIR APPIMAGE ARGV0="$0" OWD="$PWD"
dwarfs -o offset=auto -o tidy_strategy=swap -o workers="$(nproc)" -o debuglevel=warn "$0" "$APPDIR"
trap 'fusermount -quz $APPDIR; rmdir $APPDIR' 0 1 2 3 6 14 15 EXIT
"$APPDIR/AppRun" "$@"
res=$?
fusermount -quz "$APPDIR"
rmdir "$APPDIR" 2>/dev/null
exit $res
exit $?
}
printfunc() {
@ -77,7 +74,7 @@ case "$1" in
shift
zzexe "$@" ;;
--version | -v )
tput setaf 2; echo appdwarf 2022.10.10
tput setaf 2; echo appdwarf 2022.11.14
tput setaf 6; echo Built by July 🏳️‍🌈; exit ;;
-* | '' )
echo "Usage: appdwarf [option] [APP/FILE/FOLDER/URL] [compression options]"