2019-04-07 02:20:39 +00:00
|
|
|
|
NEW
|
|
|
|
|
PREFIX
|
|
|
|
|
AUTO 4,1
|
|
|
|
|
#!/BIN/SH
|
|
|
|
|
#
|
|
|
|
|
# This script creates Bootable A2osX Disks.
|
|
|
|
|
#
|
|
|
|
|
# This script will prompt the user for any needed information
|
|
|
|
|
# such as version of PRODOS to include and then will verify that
|
|
|
|
|
# it has the right media and files available.
|
|
|
|
|
#
|
|
|
|
|
# Note this is the first version of the script so it may not
|
|
|
|
|
# include the finished/polished UI that is planned.
|
|
|
|
|
#
|
|
|
|
|
# Media Types: RELEASE, RC, STABLE, and BLEED.
|
|
|
|
|
# Media Formats: 140K, 800K, and 32MB.
|
|
|
|
|
#
|
|
|
|
|
# First we define the functions this script uses.
|
|
|
|
|
#
|
|
|
|
|
#FUNC ECHOAT
|
|
|
|
|
# ECHO -N "\e[${1};${2}H${3}"
|
|
|
|
|
#END
|
|
|
|
|
|
|
|
|
|
ECHO "\f A2osX Make Discs Utility"
|
|
|
|
|
ECHO
|
2019-04-11 02:48:43 +00:00
|
|
|
|
READ -P "Which Build Number is the Source: " BUILD
|
2019-04-07 02:20:39 +00:00
|
|
|
|
SET SOURCE = "/MAKE/BUILDS/BUILD${BUILD}"
|
2019-04-11 02:48:43 +00:00
|
|
|
|
ECHO
|
|
|
|
|
ECHO "\nSOURCE IS :${SOURCE}"
|
|
|
|
|
IF [ -Z $SOURCE ]
|
2019-04-07 02:20:39 +00:00
|
|
|
|
ECHO "You pressed return with no choice, bad idea"
|
|
|
|
|
EXIT
|
|
|
|
|
FI
|
|
|
|
|
IF [ -D $SOURCE ]
|
|
|
|
|
ELSE
|
|
|
|
|
ECHO "Invalid Build - Exiting"
|
|
|
|
|
EXIT
|
|
|
|
|
FI
|
2019-04-11 02:48:43 +00:00
|
|
|
|
ECHO "\nTypes: RELEASE, RC, STABLE, and BLEED\n"
|
2019-04-07 02:20:39 +00:00
|
|
|
|
READ -P "Which Type to you want to make: " TYPE
|
2019-04-11 02:48:43 +00:00
|
|
|
|
ECHO
|
2019-04-07 02:20:39 +00:00
|
|
|
|
IF [ -Z $TYPE ]
|
|
|
|
|
ECHO "You pressed return with no choice, bad idea"
|
|
|
|
|
EXIT
|
|
|
|
|
FI
|
|
|
|
|
SWITCH $TYPE
|
|
|
|
|
CASE "release"
|
|
|
|
|
CASE "Release"
|
|
|
|
|
CASE "RELEASE"
|
|
|
|
|
SET TYPE = "RELEASE"
|
|
|
|
|
BREAK
|
|
|
|
|
CASE "rc"
|
|
|
|
|
CASE "Rc"
|
|
|
|
|
CASE "RC"
|
|
|
|
|
SET TYPE = "RC"
|
|
|
|
|
BREAK
|
|
|
|
|
CASE "stable"
|
|
|
|
|
CASE "Stable"
|
|
|
|
|
CASE "STABLE"
|
|
|
|
|
SET TYPE = "STABLE"
|
|
|
|
|
BREAK
|
|
|
|
|
CASE "bleed"
|
|
|
|
|
CASE "Bleed"
|
|
|
|
|
CASE "BLEED"
|
|
|
|
|
SET TYPE = "BLEED"
|
|
|
|
|
BREAK
|
|
|
|
|
DEFAULT
|
|
|
|
|
ECHO "You entered an invalid choice"
|
|
|
|
|
EXIT
|
|
|
|
|
END
|
2019-04-11 02:48:43 +00:00
|
|
|
|
ECHO "\nMedia: 140K, 800K and 32MB (1, 8 or 32)\n"
|
2019-04-07 02:20:39 +00:00
|
|
|
|
READ -P "Which Media to you want to make: " MEDIA
|
2019-04-11 02:48:43 +00:00
|
|
|
|
ECHO
|
2019-04-07 02:20:39 +00:00
|
|
|
|
IF [ -Z $MEDIA ]
|
|
|
|
|
ECHO "You pressed return with no choice, bad idea"
|
|
|
|
|
EXIT
|
|
|
|
|
FI
|
|
|
|
|
SWITCH $MEDIA
|
|
|
|
|
CASE "1"
|
|
|
|
|
CASE "140"
|
|
|
|
|
CASE "140K"
|
|
|
|
|
CASE "140k"
|
|
|
|
|
SET MEDIA = "140"
|
|
|
|
|
BREAK
|
|
|
|
|
CASE "8"
|
|
|
|
|
CASE "800"
|
|
|
|
|
CASE "800K"
|
|
|
|
|
CASE "800k"
|
|
|
|
|
SET MEDIA = "800"
|
|
|
|
|
BREAK
|
|
|
|
|
CASE "32"
|
|
|
|
|
CASE "32MB"
|
|
|
|
|
CASE "32mb"
|
|
|
|
|
CASE "32Mb"
|
|
|
|
|
SET MEDIA = "32"
|
|
|
|
|
BREAK
|
|
|
|
|
DEFAULT
|
|
|
|
|
ECHO "You entered an invalid choice"
|
|
|
|
|
EXIT
|
|
|
|
|
END
|
2019-04-11 02:48:43 +00:00
|
|
|
|
ECHO "\nProDOS version: 2.03 or 2.42 (3 or 42)\n"
|
2019-04-07 02:20:39 +00:00
|
|
|
|
READ -P "Which ProDOS version to want installed: " PRODOS
|
2019-04-11 02:48:43 +00:00
|
|
|
|
ECHO
|
2019-04-07 02:20:39 +00:00
|
|
|
|
IF [ -Z $PRODOS ]
|
|
|
|
|
ECHO "You pressed return with no choice, bad idea"
|
|
|
|
|
EXIT
|
|
|
|
|
FI
|
|
|
|
|
SWITCH $PRODOS
|
|
|
|
|
CASE "3"
|
|
|
|
|
CASE "03"
|
|
|
|
|
CASE "2.03"
|
|
|
|
|
SET PRODOS = "2.03"
|
|
|
|
|
BREAK
|
|
|
|
|
CASE "42"
|
|
|
|
|
CASE "2.42"
|
|
|
|
|
SET PRODOS = "2.42"
|
|
|
|
|
BREAK
|
|
|
|
|
DEFAULT
|
|
|
|
|
ECHO "You entered an invalid choice"
|
|
|
|
|
EXIT
|
|
|
|
|
END
|
2019-04-11 02:48:43 +00:00
|
|
|
|
ECHO "\nPlease make sure that the ${TYPE} ${MEDIA} is online\n"
|
2019-04-07 02:20:39 +00:00
|
|
|
|
READ -P "Ready to make your disk (Y/N): " GO
|
2019-04-11 02:48:43 +00:00
|
|
|
|
ECHO
|
2019-04-07 02:20:39 +00:00
|
|
|
|
IF [ -Z $GO ]
|
|
|
|
|
ECHO "You pressed return with no choice, bad idea"
|
|
|
|
|
EXIT
|
|
|
|
|
FI
|
|
|
|
|
IF [ $GO = "y" ]
|
|
|
|
|
SET GO = "Y"
|
|
|
|
|
FI
|
|
|
|
|
IF [ $GO = "Y" ]
|
|
|
|
|
ELSE
|
|
|
|
|
ECHO "\nOK, Well you have a nice day. Bye!"
|
|
|
|
|
EXIT
|
|
|
|
|
FI
|
|
|
|
|
SET DEST = "/${TYPE}${MEDIA}/"
|
|
|
|
|
# Verify that DESTINATION is ONLINE
|
|
|
|
|
IF [ -D $DEST ]
|
2019-04-11 02:48:43 +00:00
|
|
|
|
ECHO "\nValid Destination Volume found"
|
2019-04-07 02:20:39 +00:00
|
|
|
|
ELSE
|
2019-04-11 02:48:43 +00:00
|
|
|
|
ECHO "\nCould not find Valid Destination Volume - Exiting"
|
2019-04-07 02:20:39 +00:00
|
|
|
|
EXIT
|
|
|
|
|
FI
|
|
|
|
|
# At least check that a2osx.system is on disk.
|
|
|
|
|
IF [ -F ${SOURCE}/A2OSX.SYSTEM ]
|
|
|
|
|
ELSE
|
2019-04-11 02:48:43 +00:00
|
|
|
|
ECHO "\nSource Directory missing SYSTEM files - Exiting"
|
2019-04-07 02:20:39 +00:00
|
|
|
|
EXIT
|
|
|
|
|
FI
|
|
|
|
|
#
|
2019-04-11 02:48:43 +00:00
|
|
|
|
# Lets check that there is 1 and only 1 DEST volume on line
|
2019-04-07 02:20:39 +00:00
|
|
|
|
# and get its DEV id so we can format it.
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Verify that ProDOS is on DEST DISK
|
|
|
|
|
IF [ -F ${DEST}/PRODOS ]
|
|
|
|
|
ELSE
|
2019-04-11 02:48:43 +00:00
|
|
|
|
ECHO "\nDestination Volume missing ProDOS - Exiting"
|
2019-04-07 02:20:39 +00:00
|
|
|
|
EXIT
|
|
|
|
|
FI
|
|
|
|
|
|
2019-04-11 02:48:43 +00:00
|
|
|
|
#CP ${SOURCE} ${DEST}
|
2019-04-07 02:20:39 +00:00
|
|
|
|
|
|
|
|
|
MAN
|
|
|
|
|
TEXT /MAKE/USR/SHARE/MAKE/MAKEDISKS
|