#!/bin/ash
# roclone: muLinux read-only cloner 
# (C) by M. Andreoli, 1999-2000 

#set -x

. /usr/clone/clone.lib

menu()
{
clear
echo -e $BRIGHT$GREEN
cat <<END
  __            _
 / _|___    ___| | ___  _ __   ___ _ __
| |_/ __|  / __| |/ _ \| '_ \ / _ \ '__|
|  _\__ \ | (__| | (_) | | | |  __/ |           muLinux cloner v0.2
|_| |___/  \___|_|\___/|_| |_|\___|_|           for READ-ONLY mutants
END
echo -e $NORMAL

echo -e "${BRIGHT}${RED}(C) Rustic Software Foundation, 1999${NORMAL}"
echo -e "${BRIGHT}${RED}May contains fractured (TM) english.${NORMAL}"


echo -e $BRIGHT$WHITE
cat <<END
How to put a frozen copy of current filesystem in a (maybe read-only,
bootable) media, with DOS campatible formatting. Usefull for clone on 
Iomega ZIP, CD-R/CD-RW and other removable media (SCSI devices supported). 
END
echo -e $NORMAL

echo -e $BRIGHT$GREEN
cat <<END
	[1] Configure
	[2] Prepare BOOT images
	[3] Prepare USR image
	[4] Copy the supplied OPT directory on the Master 
	[5] Prepare an iso9660 EL-Torito image 	

	[6] Burn a CD, from a master
	[7] Make a BLOCK (i.e. IDE, SCSI, ZIP, ...) muLinux

	[q] quit
END
echo -e $NORMAL
}

# Main switch

while [ 1 ] ; do
menu
read -p "Your choice [1] " a
[ -z "$a" ] && a=1

# Main switch

PATH="$PATH:/usr/clone"
case $a in
q)	
	exit
	;;
1)
	make.config
	;;
2)
	make.boot
	;;
3)	
	make.usr
	;;
4)	
	make.opt
	;;
5)
	make.isofs
	;;
6)
	make.cd
	;;
7)
	make.hd
	;;
*)
	echo "unsupported." 
	;;
esac

read -p "press -ENTER- " enter 
done
