mirror of https://github.com/Phantop/appdwarf.git
appdwarf/zzexe: small header updates
use trap better with zzexe and updated dwarfs args
This commit is contained in:
parent
8bdf108297
commit
c7ff9fcfec
11
appdwarf
11
appdwarf
|
@ -10,10 +10,9 @@ apprun() {
|
||||||
|
|
||||||
header() {
|
header() {
|
||||||
set -e
|
set -e
|
||||||
APPDIR=$(mktemp -d)
|
APPDIR=$(mktemp -d) APPIMAGE="$(realpath "$0")"
|
||||||
APPIMAGE="$(realpath "$0")"
|
|
||||||
export APPDIR APPIMAGE ARGV0="$0" OWD="$PWD"
|
export APPDIR APPIMAGE ARGV0="$0" OWD="$PWD"
|
||||||
dwarfs -o offset=auto -o tidy_strategy=swap -o workers="$(nproc)" -o debuglevel=warn "$0" "$APPDIR"
|
dwarfs -o offset=auto -o tidy_strategy=swap -o workers="$(nproc)" "$0" "$APPDIR"
|
||||||
trap 'fusermount -quz $APPDIR; rmdir $APPDIR' 0 1 2 3 6 14 15 EXIT
|
trap 'fusermount -quz $APPDIR; rmdir $APPDIR' 0 1 2 3 6 14 15 EXIT
|
||||||
"$APPDIR/AppRun" "$@"
|
"$APPDIR/AppRun" "$@"
|
||||||
exit $?
|
exit $?
|
||||||
|
@ -46,9 +45,7 @@ zzexe_header() {
|
||||||
ln -s "$out" "$dir"
|
ln -s "$out" "$dir"
|
||||||
trap 'rm "$out" "$dir/$(basename "$out")"' 0 1 2 3 6 14 15 EXIT
|
trap 'rm "$out" "$dir/$(basename "$out")"' 0 1 2 3 6 14 15 EXIT
|
||||||
"$dir/$(basename "$out")" "$@"
|
"$dir/$(basename "$out")" "$@"
|
||||||
res=$?
|
exit $?
|
||||||
rm "$out" "$dir/$(basename "$out")"
|
|
||||||
exit $res
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -74,7 +71,7 @@ case "$1" in
|
||||||
shift
|
shift
|
||||||
zzexe "$@" ;;
|
zzexe "$@" ;;
|
||||||
--version | -v )
|
--version | -v )
|
||||||
tput setaf 2; echo appdwarf 2022.11.14
|
tput setaf 2; echo appdwarf 2022.11.15
|
||||||
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 New Issue