#!/mod/bin/jimsh package require cgi source /mod/var/mongoose/lib/setup require ts.class pretty_size system.class tdelete puts "Content-Type: text/html\r\n" cgi_input #cgi_dump set dir [cgi_get dir] regsub -all {([\\["$])} $dir {\\\1} dir #puts "DIR: ($dir)" if {[system pkginst undelete]} { set dustbin [system dustbin] } else { set dustbin "" } proc bindir {file} { global dustbin set dir [file dirname $file] regsub "^[system mediaroot]" $dir $dustbin ndir if {$dir eq $ndir} { set ndir $dustbin } system mkdir_p $ndir return $ndir } proc touch {file} { exec /mod/bin/busybox/touch $file } puts "
Deleting...
" puts ""