NEW
  PREFIX
AUTO 4,1
#!/bin/sh
#
#  This script makes an UPDATE.PAK file using the files
#  found in a particular BUILD stored in /make/builds
#
. makefuncs
CALL CS
CALL TBOX "      Update PAK Creator"
READ -P "Do you want to proceed (Y/N)?  " P
SWITCH $P
  CASE Y
  CASE y
    ECHO
    BREAK
  DEFAULT
    ECHO "\n\nExiting.\n"
    EXIT
END
ECHO
READ -P "WHICH BUILD NO:  " B
IF [ -Z $B ]
  ECHO "You did not enter any response."
  ECHO
  ECHO "Exiting"
  EXIT
FI
SET SRC = "/MAKE/BUILDS/BUILD${B}"
IF [ -D ${SRC} ]
  ECHO "\n\nFound Valid BUILD\n"
ELSE
  ECHO "\n\nValid BUILD not found."
  ECHO
  ECHO "Exiting"
  EXIT
FI
rm -r -q /MAKE/update
md /MAKE/update
md /MAKE/update/bin
md /MAKE/update/drv
md /MAKE/update/inc
md /MAKE/update/lib
md /MAKE/update/root
md /MAKE/update/sbin
md /MAKE/update/sys
md /MAKE/update/sys/km
ECHO "Copying Files..."
FOR FILE IN (updatefiles)
  cp -Y -Q ${SRC}/${FILE} /MAKE/update/${FILE}
NEXT
cp -Y -Q ${SRC}/PRODOS.FX /MAKE/update/ProDOS
cd /MAKE/update
pak update.${B} -r *
ECHO "Update Created!"
MAN
TEXT /MAKE/USR/SHARE/MAKE/MAKEUPDATE
