2021-03-06 23:40:15 +00:00
|
|
|
#!/bin/sh
|
2021-03-28 04:38:12 +00:00
|
|
|
H=/tmp/folheader
|
|
|
|
echo '#!/bin/sh' > $H
|
2021-08-15 17:51:07 +00:00
|
|
|
echo D=\"$1\" >> $H
|
2021-03-28 04:38:12 +00:00
|
|
|
cat >> $H <<'EOF'
|
2021-08-15 17:51:07 +00:00
|
|
|
if [ ! -d "$D" ]; then
|
|
|
|
mkdir "$D"
|
2021-11-08 21:38:08 +00:00
|
|
|
dwarfs -o offset=auto -o tidy_strategy=swap "$0" "$D"
|
2021-03-06 23:40:15 +00:00
|
|
|
else
|
2021-08-15 17:51:07 +00:00
|
|
|
fusermount -u "$D"
|
|
|
|
rmdir "$D"
|
2021-03-06 23:40:15 +00:00
|
|
|
fi
|
2021-03-28 04:38:12 +00:00
|
|
|
exit
|
2021-03-06 23:40:15 +00:00
|
|
|
EOF
|
|
|
|
|
2021-08-15 17:51:07 +00:00
|
|
|
shift
|
2021-11-08 21:38:08 +00:00
|
|
|
mkdwarfs -i . -o "$PWD.sh" -B3 --header $H $@
|
2021-03-06 23:40:15 +00:00
|
|
|
chmod +x "$PWD.sh"
|
2021-03-28 04:38:12 +00:00
|
|
|
rm $H
|