1#!/usr/local/bin/tclsh 2# -*- tcl -*- 3# check the manifest against the current contents of the directory 4 5set manifest [lindex $argv 0] 6 7rename file ori_file 8proc file {name} { 9 global files 10 set files($name) 1 11 if {! [ori_file exists $name]} { 12 puts stdout "missing: $name" 13 } 14} 15 16# read manifest and check existence of all listed files 17source $manifest 18 19 20# now backwards: find all files and check 21# for files not listed in the manifest 22 23set list [exec find . -print] 24regsub -all "\n" $list { } list 25 26foreach f $list { 27 if {[catch {set files($f)}]} { 28 puts stdout "new: $f" 29 } 30} 31