[37246] users/raimue/find-variables-in-portindex.tcl
Revision: 37246 http://trac.macosforge.org/projects/macports/changeset/37246 Author: raimue@macports.org Date: 2008-05-31 16:39:10 -0700 (Sat, 31 May 2008) Log Message: ----------- A little helper script I used to generate the list of options 'port info' accepts (all variables from the PortIndex) Added Paths: ----------- users/raimue/find-variables-in-portindex.tcl Added: users/raimue/find-variables-in-portindex.tcl =================================================================== --- users/raimue/find-variables-in-portindex.tcl (rev 0) +++ users/raimue/find-variables-in-portindex.tcl 2008-05-31 23:39:10 UTC (rev 37246) @@ -0,0 +1,27 @@ +#!/usr/bin/env tclsh + +if {$argc != 1} { + puts stderr "Usage: $argv0 PortIndex" + exit +} + +set fd [open [lindex $argv 0] r] + +set vars {} +while {[gets $fd line] >= 0} { + set name [lindex $line 0] + set len [lindex $line 1] + set line [read $fd $len] + + set swx 1 + foreach item $line { + if {$swx} { + lappend vars $item + } + set swx [expr !$swx] + } +} + +set vars [lsort -unique $vars] + +puts $vars Property changes on: users/raimue/find-variables-in-portindex.tcl ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + Id Name: svn:eol-style + native
participants (1)
-
raimue@macports.org