]> granicus.if.org Git - graphviz/commitdiff
make cmap_tester.tcl handle output filenames from "dot ... -O"
authorellson <devnull@localhost>
Wed, 30 Apr 2008 16:54:13 +0000 (16:54 +0000)
committerellson <devnull@localhost>
Wed, 30 Apr 2008 16:54:13 +0000 (16:54 +0000)
cmd/dot/cmap_tester.tcl

index 362ed3c8376c2b91f3b6be67a0965220cebc8cdc..2bde46e06767cc9a341f682998273b38c825cab9 100755 (executable)
@@ -23,6 +23,12 @@ if {[file exists $fn.gif]} {
        set image_type gif
 } elseif {[file exists $fn.png]} {
        set image_type png
+} elseif {[file exists [lindex $argv 0].png]} {
+       set fn [lindex $argv 0]
+       set image_type png
+} elseif {[file exists [lindex $argv 0].gif]} {
+       set fn [lindex $argv 0]
+       set image_type gif
 } else {
        puts stderr "image file $fn.gif or $fn.png does not exist."
        exit