#!/bin/zsh set -e if [[ ! -f $1 ]]; then echo "Image $1 not found" exit 1 fi if [[ ! -d $1.mnt ]]; then mkdir $1.mnt fi mount -o loop,offset=32256 $1 $1.mnt