2013-09-09 19:38:56 +00:00
|
|
|
#!/mod/bin/jimsh
|
|
|
|
|
|
|
|
source /mod/webif/lib/setup
|
|
|
|
require system.class ts.class
|
|
|
|
|
|
|
|
proc scan {dir} {
|
2013-10-23 20:38:25 +00:00
|
|
|
puts "Resetting unwatched count on $dir..."
|
2013-09-09 19:38:56 +00:00
|
|
|
file stat "$dir/" st
|
|
|
|
if {$st(dev) != $::rootdev} { return }
|
|
|
|
|
|
|
|
ts resetnew $dir
|
|
|
|
|
|
|
|
foreach entry [readdir -nocomplain $dir] {
|
|
|
|
if {[file isdirectory "$dir/$entry"]} {
|
|
|
|
scan "$dir/$entry"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
set root [system mediaroot]
|
|
|
|
file stat "$root/" rootstat
|
|
|
|
set rootdev $rootstat(dev)
|
|
|
|
|
|
|
|
scan $root
|
|
|
|
|