appdwarf/header

12 lines
357 B
Bash
Executable File

#!/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>/dev/null
"$APPDIR/AppRun" "$@"
res=$?
fusermount -quz "$APPDIR"
rmdir "$APPDIR" > /dev/null
exit $res