1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-12-02 19:43:44 +00:00
dotfiles/.local/bin/appsquash

19 lines
334 B
Plaintext
Raw Normal View History

#!/bin/sh
mksquashfs $@ squash -comp zstd -b 1M -Xcompression-level 22
cat > script <<'EOF'
#!/bin/sh
file=$(basename $0)
DIR=/tmp/.mount_$file$RANDOM
mkdir $DIR
squashfuse -o offset=154 $0 $DIR
$DIR/AppRun $@
fusermount -uz $DIR
rmdir $DIR
exit
EOF
cat script squash > $(basename $@).sh
chmod +x $(basename $@).sh
rm script squash