#! /usr/bin/env tclkit # expand gzipped tclkit's and rename for submitting it file mkdir expanded foreach x $argv { set t [file tail $x] puts $t foreach y [glob -nocomplain $x/*] { puts $y set f [file tail $y] if {[file ext $f] eq ".gz"} { regsub {\.gz$} $f {} f exec gzip -d <$y >expanded/$t-$f } else { file copy -force $y expanded/$t-$f } file mtime expanded/$t-$f [file mtime $y] } }