appdwarf/header

12 lines
353 B
Plaintext
Raw Normal View History

#!/bin/sh
ARGV0="$(basename "$0")"; APPDIR="/tmp/dwarf_$ARGV0$(echo "$0"|md5sum|head -c5)"
export APPIMAGE="$0" OWD="$PWD" ARGV0 APPDIR
[ ! -d "$APPDIR" ] && mkdir "$APPDIR" &&
dwarfs -o offset=auto -o tidy_strategy=swap -o workers=4 "$0" "$APPDIR" 2>&1|:
"$APPDIR/AppRun" "$@"
res=$?
fusermount -quz "$APPDIR"
rmdir "$APPDIR" /dev/null
exit $res