#!/bin/bash fuse_opts="-o allow_other -o nonempty" mkdir -p mnt MNT=$PWD/mnt for P in pnd/*.pnd; do N=${P#pnd/} # mode=`stat -c %a` D=$MNT/${N%.pnd} if [ -e "$D" ]; then q rmdir "$D" || continue fi mkdir -p "$D" file_type=`file "$P"` case "$file_type" in *Squashfs*) v squashfuse "$P" "$D" $fuse_opts ;; *"ISO 9660"*) v fuseiso "$P" "$D" $fuse_opts ;; *) echo >&2 "unknown pnd filesystem: $file_type" esac done