#!/bin/sh

if [ -z "$1" ];then
	echo "Usage: `basename $0` <isoimage>"
	exit 0
fi

if [ ! -f "$1" ];then
	echo This is not a file or it does not exist
	exit 1
fi

echo Mount CD image

. /users/samba/grml/config.grml

#create remaster root
mkdir -p "$BASE_DIR"/grml-remaster
# We will create another mountpoint, hence the '1' at the end 
mkdir -p "$BASE_DIR"/grml-remaster/mount1
# Mount iso image
sudo mount "$1" "$BASE_DIR"/grml-remaster/mount1 -o loop

