2021-02-10 00:11:23 +00:00
|
|
|
#!/bin/sh
|
|
|
|
mkdir appdir
|
2021-02-25 21:54:50 +00:00
|
|
|
mkdwarfs -i $@ -o appdir/root.dwarfs
|
2021-02-10 00:11:23 +00:00
|
|
|
|
2021-02-25 21:54:50 +00:00
|
|
|
cat > appdir/AppRun <<'EOF'
|
2021-02-10 00:11:23 +00:00
|
|
|
#!/bin/sh
|
|
|
|
HERE=$(dirname $(readlink -f "${0}"))
|
|
|
|
DIR=/tmp/.dwarf_$RANDOM
|
|
|
|
mkdir $DIR 2> /dev/null
|
|
|
|
dwarfs $HERE/root.dwarfs $DIR 2> /dev/null
|
|
|
|
$DIR/AppRun $@
|
|
|
|
fusermount -uz $DIR 2> /dev/null
|
|
|
|
rmdir $DIR 2> /dev/null
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x appdir/AppRun
|
|
|
|
mksquashfs appdir app.sfs -noD
|
|
|
|
cat $(which appimageruntime) app.sfs > $(basename $@).sh
|
|
|
|
chmod +x $(basename $@).sh
|
|
|
|
rm -r appdir app.sfs
|