DoWalnutScavenge <rootFileName>
Copyright Ó 1991, 1992 by Xerox Corporation. All rights reserved.
Swinehart, March 15, 1992 5:06 pm PST
DoWalnutScavenge $1=<rootFileName> (from profile) $2=<caching> (on)
Doug Terry, February 12, 1992 9:34 am PST
Willie-s, April 27, 1992 2:23 pm PDT
Require Cedar WallTapestry WalnutUtils
Date
WalnutFile . clear
setproperty rootFileName ($(WalnutFile $1))
CloseAll
setproperty rootDirectory ($(DirectoryOf $rootFileName))
setproperty logFileName ($rootDirectory$(WalnutFile $rootFileName log))
setproperty dbFile ($(WalnutFile $rootFileName db))
setproperty dbDirectory ($(DirectoryOf $dbFile))
setproperty shortDB ($(ShortNameOf $dbFile))
Echo Destructive behavior past here . . . Push STOP to bail out.
Echo If any step beyond this point fails, seek assistance from Walnut
Echo Support personnel.
Sleep 10
setproperty lbLog ($(WalnutFile $rootFileName lblog))
setproperty oldLbLog ($(FindTemp $lbLog))
LBFlush ALL
Rename $oldLbLog ← $lbLog
push $dbDirectory
Delete *.lbindex
For now, leave user's DB specification alone, and just reinitialize it.
Delete $shortDB
LBCreate $shortDB Key MsgSet ShowIs $x $y $z (e.g., Subject Sender From)
MakeEmptyLBLog $lbLog
That puts a single termination character into the LB log file.
LBBuildindices $shortDB
pop
LBParam -cacheSize 15000 -cacheStretch 15000 -dateCompare on -caching $(ScriptDefault on $2) -writeCaching off
Echo Scavenging $rootFileName
WalnutScavenge $rootFileName
Sleep 5
Waitt
LBParam -cacheSize 2500 -cacheStretch 1000 -writeCaching off
Echo Scavenge of $rootFileName complete at ($(date)).
CloseAll
Sleep 5
walnut $rootFileName