#!/bin/sh

dir="ms";
all_flag=0;
while [ $# -gt 0 ] ; do
	case $1 in
		-i | --img) dir="$2"; shift; shift;;
		-a | --all) all_flag=1; shift;;
		*) shift;;
	esac;
done;

mntmem;
if [ $all_flag -eq 1 ] ; then
	cp -rv ${dir}/open-r /mnt/memstick;
else
	cp -ruv ${dir}/open-r /mnt/memstick;
fi;
umntmem;
