mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-11-20 05:43:43 +00:00
Use mktemp to make mounting folder
This commit is contained in:
parent
8251c94f9d
commit
3d229b558c
5
appdwarf
5
appdwarf
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
IFS=$'\n\t'
|
||||
version=1
|
||||
version=1.1
|
||||
|
||||
usage(){
|
||||
echo "Usage: $(basename "$0") [option] [FILE/FOLDER/URL]"
|
||||
|
@ -13,8 +13,7 @@ usage(){
|
|||
dwarf() {
|
||||
mkdwarfs -i "$1" -o "$(basename "$1").sh" "${@:2}" --header <(cat << 'EOF'
|
||||
#!/bin/sh
|
||||
DIR=/tmp/.dwarf_$(basename "$0")$RANDOM
|
||||
mkdir "$DIR" 2> /dev/null
|
||||
DIR="$(mktemp -td dwarf_$(basename "$0")XXXXX)"
|
||||
dwarfs -o offset=auto "$0" "$DIR" 2> /dev/null
|
||||
"$DIR/AppRun" "$@"
|
||||
fusermount -uz "$DIR" 2> /dev/null
|
||||
|
|
Loading…
Reference in a new issue