forked from hummypkg/webif
5f473c9e72
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1833 2a923420-c742-0410-a762-8d5b09965624
32 lines
513 B
Plaintext
Executable File
32 lines
513 B
Plaintext
Executable File
#!/mod/bin/jimsh
|
|
|
|
source /mod/webif/lib/setup
|
|
require system.class ts.class
|
|
|
|
ts iterate [lambda {ts} {
|
|
#puts " [$ts get file]"
|
|
if {[$ts flag "Shrunk"]} { return }
|
|
|
|
set file [file rootname [$ts get file]]
|
|
|
|
if {[$ts inuse]} { return }
|
|
|
|
if {[catch {
|
|
set perc [exec /mod/bin/stripts -aq $file]
|
|
} msg]} {
|
|
return
|
|
}
|
|
|
|
if {[string match {*%} $perc]} {
|
|
set perc [string range $perc 0 end-1]
|
|
} else {
|
|
set perc 0
|
|
}
|
|
|
|
if {$perc == 0} {
|
|
puts " Flagging $file as shrunk..."
|
|
$ts set_shrunk
|
|
}
|
|
}] 1
|
|
|