mirror of
https://github.com/Phantop/dotfiles
synced 2024-08-20 15:24:47 +00:00
19 lines
267 B
Bash
Executable file
19 lines
267 B
Bash
Executable file
#!/bin/sh
|
|
H=/tmp/folheader
|
|
echo '#!/bin/sh' > $H
|
|
echo D=$@ >> $H
|
|
cat >> $H <<'EOF'
|
|
if [ ! -d $D ]; then
|
|
mkdir $D
|
|
dwarfs -o offset=auto "$0" $D
|
|
else
|
|
fusermount -u $D
|
|
rmdir $D
|
|
fi
|
|
exit
|
|
EOF
|
|
|
|
mkdwarfs -i . -o "$PWD.sh" --header $H
|
|
chmod +x "$PWD.sh"
|
|
rm $H
|