remove global ::, allow test as argument

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1374 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2013-01-27 21:26:45 +00:00
parent 52939392ba
commit 1ff5b8ec0e

View File

@ -249,7 +249,7 @@ proc scan {dir attr {force 0}} {{indent 0}} {
if {$::testing} { puts "[string repeat " " $indent]\[$dir]" } if {$::testing} { puts "[string repeat " " $indent]\[$dir]" }
#if {[string match {\[*} $dir]} continue #if {[string match {\[*} $dir]} continue
if {$dir eq $::dustbin} { if {$dir eq $dustbin} {
puts "Dustbin, skipping." puts "Dustbin, skipping."
return return
} }
@ -276,6 +276,7 @@ proc scan {dir attr {force 0}} {{indent 0}} {
set root [system mediaroot] set root [system mediaroot]
if {[llength $argv] > 0} { if {[llength $argv] > 0} {
if {[lindex $argv 0] eq "test"} { set testing 1 }
foreach arg $argv { scan $root $arg } foreach arg $argv { scan $root $arg }
} else { } else {
foreach arg {dedup decrypt shrink mpg} { foreach arg {dedup decrypt shrink mpg} {