mirror of
https://github.com/Phantop/dotfiles
synced 2024-11-05 06:25:00 +00:00
25 lines
426 B
Bash
Executable file
25 lines
426 B
Bash
Executable file
#!/bin/sh
|
|
a=../appdir
|
|
mkdir $a
|
|
mkdwarfs -i . -o $a/root.dwarfs
|
|
|
|
echo '#!/bin/sh' > $a/AppRun
|
|
echo D=$@ >> $a/AppRun
|
|
cat >> $a/AppRun <<'EOF'
|
|
H=$(dirname $(readlink -f "${0}"))
|
|
|
|
if [ ! -d $D ]; then
|
|
mkdir $D
|
|
dwarfs2 $H/root.dwarfs $D
|
|
else
|
|
fusermount -u $D
|
|
rmdir $D
|
|
fi
|
|
EOF
|
|
|
|
chmod +x $a/AppRun
|
|
mksquashfs $a ../app.sfs -noD
|
|
cat $(which appimageruntime) ../app.sfs > $PWD.sh
|
|
chmod +x "$PWD.sh"
|
|
rm -r $a ../app.sfs
|