mirror of
https://github.com/Phantop/appdwarf.git
synced 2025-01-09 05:37:04 +00:00
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:
parent
51d60260cb
commit
e05f9223d0
19
appdwarf
19
appdwarf
|
@ -8,18 +8,15 @@ apprun() {
|
||||||
exec "$APPDIR/$(basename "$ARGV0")" "$@"
|
exec "$APPDIR/$(basename "$ARGV0")" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# shellcheck disable=SC2086,SC2155
|
|
||||||
header() {
|
header() {
|
||||||
APPDIR="/tmp/dwarf_$(realpath "$0" | sed 's#/#_#g')"
|
set -e
|
||||||
export APPDIR APPIMAGE="$(realpath "$0")" ARGV0="$0" OWD="$PWD"
|
APPDIR=$(mktemp -d)
|
||||||
args="-o offset=auto -o tidy_strategy=swap -o workers=4"
|
APPIMAGE="$(realpath "$0")"
|
||||||
[ ! -d "$APPDIR" ] && mkdir "$APPDIR" && dwarfs $args "$0" "$APPDIR" 2>/dev/null
|
export APPDIR APPIMAGE ARGV0="$0" OWD="$PWD"
|
||||||
trap 'fusermount -quz $APPDIR' 0 1 2 3 6 14 15 EXIT
|
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" "$@"
|
"$APPDIR/AppRun" "$@"
|
||||||
res=$?
|
exit $?
|
||||||
fusermount -quz "$APPDIR"
|
|
||||||
rmdir "$APPDIR" 2>/dev/null
|
|
||||||
exit $res
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printfunc() {
|
printfunc() {
|
||||||
|
@ -77,7 +74,7 @@ case "$1" in
|
||||||
shift
|
shift
|
||||||
zzexe "$@" ;;
|
zzexe "$@" ;;
|
||||||
--version | -v )
|
--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 ;;
|
tput setaf 6; echo Built by July 🏳️🌈; exit ;;
|
||||||
-* | '' )
|
-* | '' )
|
||||||
echo "Usage: appdwarf [option] [APP/FILE/FOLDER/URL] [compression options]"
|
echo "Usage: appdwarf [option] [APP/FILE/FOLDER/URL] [compression options]"
|
||||||
|
|
Loading…
Reference in a new issue