forked from hummypkg/webif
add rmdir_if_empty
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1654 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
0ae9a07cce
commit
9fb84443cd
@ -1,9 +1,9 @@
|
||||
Package: webif
|
||||
Priority: optional
|
||||
Section: web
|
||||
Version: 1.0.5-4
|
||||
Version: 1.0.5-5
|
||||
Architecture: mipsel
|
||||
Maintainer: af123@hummypkg.org.uk
|
||||
Depends: webif-channelicons(>=1.1.2),mongoose(>=3.0-9),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)
|
||||
Depends: webif-channelicons(>=1.1.4),mongoose(>=3.0-9),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)
|
||||
Suggests:
|
||||
Description: An evolving web interface for the Humax.
|
||||
|
@ -228,6 +228,19 @@ proc {system mkdir_p} {dir} {
|
||||
exec /mod/bin/busybox/mkdir -p $dir
|
||||
}
|
||||
|
||||
proc {system rmdir_if_empty} {dir} {
|
||||
foreach e [readdir -nocomplain $dir] {
|
||||
if {$e eq "." || $e eq ".."} continue
|
||||
if {[file isdirectory "$dir/$e"]} {
|
||||
return 0
|
||||
} elseif {[string index $e 0] ne "."} {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
file delete -force $dir
|
||||
return 1
|
||||
}
|
||||
|
||||
proc {system listening} {{mport 0}} {
|
||||
set ret {}
|
||||
foreach line [split [exec /mod/bin/busybox/netstat -lntpw] "\n"] {
|
||||
|
Loading…
Reference in New Issue
Block a user