if clipper; then PROC=pm300; else PROC=pm200; fi
if [ "$1" = "" ]; then
	echo "usage:  mkflop [-f] groupname"
	exit 1
elif [ "$1" = "-f" ] ; then
	echo '\nn\nn\nn\nn\n' > /tmp/mkflop$$
	/opus/bin/udcp -a /tmp/mkflop$$ mkflop.ans
	/opus/bin/dos REMOTE 'format a: < mkflop.ans'
	/opus/bin/dos REMOTE 'del mkflop.ans > nul'
	shift
fi

if [ -f "$1.install" ] ; then 
	INSTALL=$1.install 
else
	INSTALL=$PROC/$1.install
fi
/opus/bin/udcp -a $INSTALL a:install.bat
if [ -f "$1" ] ; then
	FILELIST=$1
else
	FILELIST=$PROC/$1
fi
for i in `cat $FILELIST`; do
	echo $i
	j=`echo $i | sed 's/\//\\\\/g'`
	if [ -d /$i ] ; then
		/opus/bin/dos REMOTE mkdir a:\\$j
	else
		/opus/bin/udcp /$i a:\\$j
	fi
done
if [ -f "$1.fixup" ] ; then
	FIXUP=$1.fixup
elif [ -f "$PROC/$1.fixup" ] ; then
	FIXUP=$PROC/$1.fixup
fi
if [ -f "$FIXUP" ] ; then sh $FIXUP ; fi
