# Press 'Command .' ('Alt .' in Mini vMac) to abort MPW command/script.
# If MPW started Think C then script execution stops after Think C exits.

SaveOnClose {Worksheet} -a

Export ShellDirectory
Set Commands ":","{ShellDirectory}Tools:"
Export Commands
Set CIIGSInclude "{ShellDirectory}Interfaces:CIIGSIncludes:"
Export CIIGSInclude

Clear ¥:° "{Active}"

If "`Exists -f ReDMCSB:SOURCE:AUTORUN.TXT`"
        Set BuildReDMCSB "1"
Else
        Set Exit 0
        Confirm "Click OK to build now or Cancel to abort."
        If {Status} == 0
                Set BuildReDMCSB "1"
        End
        Set Exit 1
End

If {BuildReDMCSB} == "1"
ReDMCSB:SOURCE:MKMA.BAT
ReDMCSB:SOURCE:MKMS.BAT
ReDMCSB:SOURCE:MKMX.BAT
ReDMCSB:SOURCE:MKMG.BAT
End

If "`Exists -f ReDMCSB:SOURCE:AUTOEXIT.TXT`"
# Two calls because the first call may fail
Shutdown··Dev:Null
Shutdown··Dev:Null
End
