mirror of
https://github.com/Phantop/dotfiles
synced 2024-11-17 12:22:57 +00:00
15 lines
320 B
Bash
Executable file
15 lines
320 B
Bash
Executable file
#!/bin/sh
|
|
mkdwarfs -i "$@" -o "$(basename "$@").sh" --header <(cat << 'EOF'
|
|
#!/bin/sh
|
|
DIR=/tmp/.dwarf_$(basename "$0")$RANDOM
|
|
mkdir "$DIR" 2> /dev/null
|
|
dwarfs -o offset=auto "$0" "$DIR" 2> /dev/null
|
|
"$DIR/AppRun" $@
|
|
fusermount -uz "$DIR" 2> /dev/null
|
|
rmdir "$DIR" 2> /dev/null
|
|
exit
|
|
EOF
|
|
)
|
|
|
|
chmod +x "$(basename "$@").sh"
|