PseudoCheckpoint.cm
Copyright Ó 1990, 1991 by Xerox Corporation. All rights reserved.
Michael Plass, March 27, 1990 11:02 am PST
This trys to save enough state from a running system to re-create a world that uses the same executables.
bugs:
Does not save RunGlobalDefaultSwitches (assumes -~o)
First, make the unix command "rollback"
Copy rollback ← $CommandFileDirectory./NullShellScript
Echo -s -n "BasicDotLoadeeCommands=Snap.pcr " >> rollback
Echo -s -n "COMMANDER←INITIAL𡤌OMMAND=Snap.cm " >> rollback
LoadedFiles -names -last PortableCommonRuntime >> rollback
Echo -s -n "-tmp /tmp -thread 60 --" >> rollback
Next, make a .pcr script that starts things through the Commander
Echo -s -n "# PseudoCheckpoint made on " > Snap.pcr
Date >> Snap.pcr
LoadedFiles -pcr -after PortableCommonRuntime -last commanderonstandardstreamsimpl >> Snap.pcr
Echo -s "# Type 'Snap' to complete rollback" >> Snap.pcr
Finally, make a .cm to run everything else, and restore installation state and search rules
LoadedFiles -command -after commanderonstandardstreamsimpl > Snap.cm
Echo -s -n "Installed " >> Snap.cm
Installed >> Snap.cm
Echo -s -n "SetSearchRules " >> Snap.cm
PrintSearchRules >> Snap.cm
PMP | PrefixLines "PMA " >> Snap.cm
WhenInstalled >> Snap.cm
Echo -s -n "Echo PseudoCheckpoint made on " >> Snap.cm
Date >> Snap.cm