diff options
author | N.N. <matju@users.sourceforge.net> | 2008-07-08 05:56:10 +0000 |
---|---|---|
committer | N.N. <matju@users.sourceforge.net> | 2008-07-08 05:56:10 +0000 |
commit | 089475041fe26964d72cb2ebc3559a36ba89a2f2 (patch) | |
tree | 4ea7537e82b2ee34748ef7cbfc18c523425d4f7a /externals/gridflow/bin/check-help-version | |
parent | d1ad56f1da41e7a88eb9a52d6b0daaf145b54ea7 (diff) |
trying to import gridflow 0.9.4
svn path=/trunk/; revision=10148
Diffstat (limited to 'externals/gridflow/bin/check-help-version')
-rwxr-xr-x | externals/gridflow/bin/check-help-version | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/externals/gridflow/bin/check-help-version b/externals/gridflow/bin/check-help-version new file mode 100755 index 00000000..cb067154 --- /dev/null +++ b/externals/gridflow/bin/check-help-version @@ -0,0 +1,49 @@ +#!/usr/bin/tclsh + +set argh0 [file normalize [file join [pwd] $argv0]] +source [file dirname $argh0]/pd-tools.tcl + +set report {} + +proc find_version_strings {lines i} { + global filename report + lappend toplefts [list patate poil] ;# temporary dummy value so that subpatches are represented in the correct order + set j $i + set versions {} + while {$i < [llength $lines]} { + set list [split [lindex $lines $i] " "] + switch -- [lindex $list 1] { + text { + set comment [join [lrange $list 4 end] " "] + if {[regexp {^GridFlow (\d\.\d\.\d)} $comment v0 v1]} { + lappend versions $v1 + } + } + connect {incr i; continue} + restore {break} + } + # recurse into subpatches (disabled because not necessary; can treat the file as one flat patch anyway) + ### if {[string compare [lindex $list 0] "#N"]==0} {set i [find_version_strings $lines [expr $i+1]]} + incr i + } + lappend report [list $filename [lsort $versions]] + return $i +} + +foreach filename $argv { + set lines [pd_read_file $filename] + find_version_strings $lines 1 +} + +set env(PRINT_CLASS_LIST) yes +set f [open "| pd -nogui -send {pd quit} 2&>1" r+] +while {![eof $f]} { + if {[regexp {^class_new (.*)} [gets $f] m0 m1]} { + puts $m1 + } +} + +foreach line [lsort -decreasing -index 1 $report] { + foreach {filename versions} $line {} + puts [format "%40s: %s" $filename $versions] +} |