#! /bin/sh # # This script runs the requested scan from the specified scan database. # # \ exec mxtclsh_script "$0" ${1+"$@"} proc main { record_list argv } { if { [ llength $argv ] != 2 } { puts stderr "" puts stderr "Usage: mt_scan scan_name scan_datafile" puts stderr "" exit } set scan_name [ lindex $argv 0 ] set scan_database [ lindex $argv 1 ] # Load the scan database. $record_list load_scans $scan_database 1 Mx::info "Scan database $scan_database successfully read." # Find the individual scan. set scan [ $record_list get_record $scan_name ] # Run the scan. Catch exceptions so that the scan database will # be updated even if the scan aborts. Mx::info "Starting scan $scan_name." catch { $scan perform_scan } # Update the scan database so that any changes in datafile names # are preserved. $record_list save_scans $scan_database Mx::info "Scan database $scan_database successfully updated." }