Changeset 1108 for trunk/gui


Ignore:
Timestamp:
Aug 11, 2008, 8:44:24 PM (16 years ago)
Author:
dkearney
Message:

adding --driver-only flag to simsim so we have an easy way to create driver files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/apps/simsim.tcl

    r693 r1108  
    384384    puts " --compare <path>      - compare the results with the provided"
    385385    puts "                         run.xml file."
     386    puts " --driver-only <fname> - only create the driver file, do not run"
    386387    puts " --help                - print this help menu."
    387388    exit 0
     
    508509set intf "./tool.xml"
    509510set cintf ""
    510 set defaults false
     511set defaults true
    511512array set presets []
    512513set i 0
    513514set oParams {}
     515set runapp true
     516set outf "driver.xml"
    514517
    515518# parse command line arguments
     
    546549            printHelp
    547550        }
     551    } elseif {("-do" == $opt) || ("--driver-only" == $opt)} {
     552        set runapp false
     553        if {[expr {$i + 1}] < $argc} {
     554            incr i
     555            set outf [lindex $argv $i]
     556        } else {
     557            printHelp
     558        }
    548559    } elseif {("-h" == $opt) || ("--help" == $opt)} {
    549560        printHelp
     
    581592# pick defaults $xmlobj $presets
    582593# pick randoms $xmlobj $presets
     594
     595# if driver only flag was given, write driver and exit.
     596if {$runapp == false} {
     597    set fid [open $outf w]
     598    puts $fid [$xmlobj xml]
     599    close $fid
     600    exit 0
     601}
    583602
    584603set tool [Rappture::Tool ::#auto $xmlobj $installdir]
Note: See TracChangeset for help on using the changeset viewer.