blob: 39f47ad1afacacf4f54df0d09b41cb6db745d564 [file] [log] [blame]
Michael Walsh24f91832018-02-15 17:19:54 -06001#!/bin/bash
2#\
3exec wish "$0" -- ${1+"$@"}
4
5source [exec bash -c "which source.tcl"]
6my_source [list print.tcl opt.tcl]
7
8longoptions test_mode:=0 quiet:=0
9pos_parms
10
11
12# Create help dictionary for call to gen_print_help.
13set help_dict [dict create\
14 ${program_name} [list "${program_name} will..."]\
15]
16
17
18proc help {} {
19
20 gen_print_help
21
22}
23
24
25proc exit_proc { {ret_code 0} } {
26
Michael Walsh410b1782019-10-22 15:56:18 -050027 # Execute whenever the program ends normally or with the signals that we catch (i.e. TERM, INT).
Michael Walsh24f91832018-02-15 17:19:54 -060028
29 dprint_executing
30 dprint_var ret_code
31
32 # Your code here.
33
34 qprint_pgm_footer
35
36 exit $ret_code
37
38}
39
40
41proc validate_parms {} {
42
43 trap { exit_proc } [list SIGTERM SIGINT]
44
45 # Your code here.
46
47}
48
49
50# Main
51
52 gen_get_options $argv
53
54 validate_parms
55
56 qprint_pgm_header
57
58 exit_proc