#! /usr/bin/env tclkit # Generate the tclkit download matrix # -jcw set R ../equi4.com/pub/tk array set O { aix AIX bsdos BSD/OS darwin {Mac OS X} freebsd FreeBSD freebsd4 {FreeBSD 4.x} freebsd5 {FreeBSD 5.x} hpux HP-UX irix IRIX irix64 {IRIX 64} linux Linux macos {Mac Classic} netbsd NetBSD openbsd OpenBSD osf1 OSF1 solaris Solaris win32 Windows } array set M { 64 {MIPS 64} 9000 {HP 9000} alpha Alpha arm ARM fat {68k + PPC} hppa PA-RISC ia64 Itanium mips MIPS n32 {MIPS 32} n770 {Nokia 770} ppc PowerPC ppc64 {PowerPC 64} s390 S/390 s390x {S/390 64} sparc SPARC univ Universal win32 x86 x86 x86 x86_64 {x86 64} } # tclkit(linux-x86-static.upx.bin) = 2 4 5 6 8 9 mk::file open db mk::view layout db.n {full sh:I os mach gui stat upx ver:I} set versions [lsort -dictionary [glob -directory $R -tails 8*]] set clear {} set n 0 foreach x $versions { foreach y [glob -nocomplain -directory $R/$x -tails tclkit*-*] { array set f {os "" mach "" gui "" sh 0 stat "" upx ""} foreach z [split $y -.] { if {[info exists O($z)]} { set f(os) $O($z) } if {[info exists M($z)]} { set f(mach) $M($z) } switch $z { aqua { set f(gui) aqua } xft { set f(gui) xft } static { set f(stat) static } tclkitsh { set f(sh) 1 } upx { set f(upx) UPX } } } eval [linsert [array get f] 0 mk::row append db.n full $y ver $n] } incr n lappend clear "" } proc rowdone {{type 2} {cells ""}} { global R versions old if {[llength $type] == 0} return set sh [lindex $type 0] set c "colspan=[expr {[llength $cells] + 5}] bgcolor=\"#eeeeee\"" switch $sh { 0 { puts "Tclkit (GUI, with Tk)" } 1 { puts "Tclkitsh (cmdline, no Tk)" } 2 { return } } set out [lrange $type 1 2] foreach x $cells v $versions { if {$x ne ""} { set f $R/$v/$x set s [file size $f] set s [expr {round($s/1024.0)}] set t [file mtime $f] set t [clock format $t -gmt 1 -format {%b %e, %Y %H:%M:%S}] set y $v set x "$y" } lappend out $x } eval lappend out [lrange $type 3 5] puts "[join $out { }]" } # embellishment by Uwe Koloska, see starkit mailing list 2006-05-08 16:41 puts { Tclkit download matrix
Please activate javascript to see nice guiding lines in the table!
} set type "" set cells "" set last {x x x x x x x x} foreach x [mk::select db.n -sort {sh os mach gui stat upx ver}] { set curr [mk::get db.n!$x sh os mach gui stat upx ver full] set diff $curr foreach l $last c $curr n {0 1 2 3 4 5 6 7} { if {$l ne $c} break if {$n < 3} { lset diff $n "" } } if {$n < 6} { rowdone $type $cells set type [lrange $diff 0 5] set cells $clear } lset cells [lindex $curr 6] [lindex $curr 7] set last $curr } rowdone $type $cells rowdone puts {
}