appdwarf/header

18 lines
468 B
Plaintext
Raw Normal View History

#!/bin/sh
# shellcheck disable=SC2086,SC2155
export APPDIR="/tmp/dwarf_$(basename "$0")$(echo "$0" | md5sum | head -c5)"
export APPIMAGE="$0"
export ARGV0="$(basename "$0")"
export OWD="$PWD"
export APPDWARF_CMD="$(basename "$0")"
if [ ! -d "$APPDIR" ]; then
mkdir "$APPDIR"
ARG="-o offset=auto -o tidy_strategy=swap -o workers=4"
dwarfs $ARG "$0" "$APPDIR" 2>/dev/null
fi
"$APPDIR/AppRun" "$@"
fusermount -quz "$APPDIR"
rmdir "$APPDIR" 2> /dev/null
exit