1#!/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
27  # Execute whenever the program ends normally or with the signals that we
28  # catch (i.e. TERM, INT).
29
30  dprint_executing
31  dprint_var ret_code
32
33  # Your code here.
34
35  qprint_pgm_footer
36
37  exit $ret_code
38
39}
40
41
42proc validate_parms {} {
43
44  trap { exit_proc } [list SIGTERM SIGINT]
45
46  # Your code here.
47
48}
49
50
51# Main
52
53  gen_get_options $argv
54
55  validate_parms
56
57  qprint_pgm_header
58
59  exit_proc
60