@@ -21,9 +21,9 @@ # Index all packages proc teapot_index {srcdir} { array set pkginfo [list] - foreach pkgdir [glob -directory $srcdir -type d */out/*] { + foreach pkgdir [glob -directory $srcdir -type d */*/*] { unset -nocomplain currpkginfo set currpkginfo(pkgdir) $pkgdir set teapot [file join $pkgdir teapot.txt] @@ -86,9 +86,9 @@ "META" { set var [string tolower [lindex $line 1]] set val [lrange $line 2 end] - set currpkginfo($var) $val + lappend currpkginfo($var) $val } } } @@ -216,8 +216,9 @@ } set pkglist [lsort -dictionary $pkglist] + file mkdir [file dirname $indexfile] set fd [open $indexfile w] puts $fd "" puts $fd " " puts $fd " List of all entities" @@ -231,10 +232,10 @@ puts $fd " " puts $fd "" close $fd - file delete -- $altindexfile file mkdir [file dirname $altindexfile] + file delete -force -- $altindexfile file link -hard $altindexfile $indexfile } # Create "package/list" @@ -318,9 +319,9 @@ } err]} { puts "Error while zipping: $err" } } else { - set origfile [lindex [glob $pkgdir *] 0] + set origfile [lindex [glob -directory $pkgdir *] 0] file copy -force -- $origfile $extfile } @@ -456,31 +457,30 @@ puts $fd "

Details of $entity_type [join $dispname_list]

" puts $fd "

Package archive

" puts $fd "

Details

" - puts $fd " " + puts $fd "
" puts $fd " " puts $fd " " puts $fd " " puts $fd " " - foreach descfield [list rsk::build::date category description license platform require summary] { + foreach descfield [list rsk::build::date as::author as::build::date as::origin category description license platform require summary] { if {![info exists currpkginfo($descfield)]} { continue } set descval $currpkginfo($descfield) switch -- $descfield { - "require" { + "require" - "as::author" - "as::origin" { catch { - set descval [join $descval {, }] + set descval [join $descval] } } } puts $fd " " puts $fd " " - - puts $fd " " + puts $fd " " puts $fd " " } puts $fd "
KeyValue
$descfield$descval[join $descval "
"]
" }