mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-10-31 20:14:27 +00:00
Phantop
3ebee5f254
Deprecates $APPDWARF_CMD for $ARGV0, as part of the standard Also finally removes the separate header, as it seems to not be needed anymore
18 lines
468 B
Bash
Executable file
18 lines
468 B
Bash
Executable file
#!/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
|