1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-17 12:22:57 +00:00
dotfiles/.local/bin/appdwarf

15 lines
320 B
Plaintext
Raw Normal View History

2021-02-10 00:11:23 +00:00
#!/bin/sh
mkdwarfs -i "$@" -o "$(basename "$@").sh" --header <(cat << 'EOF'
2021-02-10 00:11:23 +00:00
#!/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
2021-02-10 00:11:23 +00:00
EOF
)
2021-02-10 00:11:23 +00:00
chmod +x "$(basename "$@").sh"