Allow running different command in image

This commit is contained in:
Phantop 2021-11-01 18:18:17 -04:00
parent 5eca8a2ad8
commit 66a7ba3b6d
2 changed files with 3 additions and 2 deletions

View file

@ -1,4 +1,4 @@
#!/bin/sh
HERE=$(dirname $(readlink -f "${0}"))
export LD_LIBRARY_PATH="${HERE}":$PATH
wine "${HERE}"/exe "$@"
"${HERE}"/$APPDWARF_CMD "$@"

View file

@ -1,7 +1,7 @@
#!/bin/bash
set -eo pipefail
IFS=$'\n\t'
version=1.1
version=1.2
usage(){
echo "Usage: $(basename "$0") [option] [FILE/FOLDER/URL]"
@ -15,6 +15,7 @@ dwarf() {
#!/bin/sh
DIR="$(mktemp -td dwarf_$(basename "$0")XXXXX)"
dwarfs -o offset=auto -o tidy_strategy=swap "$0" "$DIR" 2> /dev/null
export APPDWARF_CMD="$0"
"$DIR/AppRun" "$@"
fusermount -uz "$DIR" 2> /dev/null
rmdir "$DIR" 2> /dev/null