diff --git a/bin/all-jfmt.sh b/bin/all-jfmt.sh index cd9ea4dd4..ca0112d63 100755 --- a/bin/all-jfmt.sh +++ b/bin/all-jfmt.sh @@ -169,7 +169,7 @@ while getopts :hv:Vd:D:j:nN flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -183,7 +183,7 @@ while getopts :hv:Vd:D:j:nN flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/all-run.sh b/bin/all-run.sh index 9b106fb72..5eef7655a 100755 --- a/bin/all-run.sh +++ b/bin/all-run.sh @@ -213,7 +213,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -230,13 +230,13 @@ while getopts :hv:Vd:D:nNt:w: flag; do *"'"*) echo "$0: ERROR: in -t tagline, the tagline may not contain a single-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -t tagline, the tagline may not contain a double-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -251,7 +251,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/all-years.sh b/bin/all-years.sh index c5061f651..f16ffaca2 100755 --- a/bin/all-years.sh +++ b/bin/all-years.sh @@ -216,7 +216,7 @@ while getopts :hv:Vd:D:nNQt:w: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -236,13 +236,13 @@ while getopts :hv:Vd:D:nNQt:w: flag; do *"'"*) echo "$0: ERROR: in -t tagline, the tagline may not contain a single-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -t tagline, the tagline may not contain a double-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -257,7 +257,7 @@ while getopts :hv:Vd:D:nNQt:w: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/chk-entry.sh b/bin/chk-entry.sh index 14412049e..710ca3773 100755 --- a/bin/chk-entry.sh +++ b/bin/chk-entry.sh @@ -172,7 +172,7 @@ while getopts :hv:Vd:D:nNU:w: flag; do w) ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/combine_author_handle.sh b/bin/combine_author_handle.sh index da9a526b7..0e9e8de22 100755 --- a/bin/combine_author_handle.sh +++ b/bin/combine_author_handle.sh @@ -196,7 +196,7 @@ while getopts :hv:Vd:D:j:nN flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -208,7 +208,7 @@ while getopts :hv:Vd:D:j:nN flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/csv2entry.sh b/bin/csv2entry.sh index 3c166a5c4..c7aecba50 100755 --- a/bin/csv2entry.sh +++ b/bin/csv2entry.sh @@ -342,7 +342,7 @@ while getopts :hv:Vd:D:nN flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/cvt-submission.sh b/bin/cvt-submission.sh index ad4164c53..38c2818b6 100755 --- a/bin/cvt-submission.sh +++ b/bin/cvt-submission.sh @@ -749,7 +749,7 @@ while getopts :hv:Vd:c:s:i:T:nN flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/entry2csv.sh b/bin/entry2csv.sh index 531c67070..3a7db7e8f 100755 --- a/bin/entry2csv.sh +++ b/bin/entry2csv.sh @@ -429,7 +429,7 @@ while getopts :hv:Vd:D:nN flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/find-missing-links.sh b/bin/find-missing-links.sh index eb81e682f..a0be854aa 100755 --- a/bin/find-missing-links.sh +++ b/bin/find-missing-links.sh @@ -219,7 +219,7 @@ while getopts :hv:Vd:nN flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/gen-authors.sh b/bin/gen-authors.sh index 3a94fb237..ca9ab6d4b 100755 --- a/bin/gen-authors.sh +++ b/bin/gen-authors.sh @@ -274,7 +274,7 @@ while getopts :hv:Vd:D:nNt:Qw: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -290,13 +290,13 @@ while getopts :hv:Vd:D:nNt:Qw: flag; do *"'"*) echo "$0: ERROR: in -t tagline, the tagline may not contain a single-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -t tagline, the tagline may not contain a double-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -312,7 +312,7 @@ while getopts :hv:Vd:D:nNt:Qw: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/gen-location.sh b/bin/gen-location.sh index e945bad7a..ce60b4b36 100755 --- a/bin/gen-location.sh +++ b/bin/gen-location.sh @@ -184,7 +184,7 @@ while getopts :hv:Vd:D:nNt:Qw: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -200,13 +200,13 @@ while getopts :hv:Vd:D:nNt:Qw: flag; do *"'"*) echo "$0: ERROR: in -t tagline, the tagline may not contain a single-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -t tagline, the tagline may not contain a double-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -222,7 +222,7 @@ while getopts :hv:Vd:D:nNt:Qw: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/gen-other-html.sh b/bin/gen-other-html.sh index 00350c94c..78d59961a 100755 --- a/bin/gen-other-html.sh +++ b/bin/gen-other-html.sh @@ -181,7 +181,7 @@ while getopts :hv:Vd:D:nNt:Qw: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -198,13 +198,13 @@ while getopts :hv:Vd:D:nNt:Qw: flag; do *"'"*) echo "$0: ERROR: in -t tagline, the tagline may not contain a single-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -t tagline, the tagline may not contain a double-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -217,7 +217,7 @@ while getopts :hv:Vd:D:nNt:Qw: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/gen-sitemap.sh b/bin/gen-sitemap.sh index c46396bef..623d02f8c 100755 --- a/bin/gen-sitemap.sh +++ b/bin/gen-sitemap.sh @@ -263,7 +263,7 @@ while getopts :hv:Vd:nNw:W flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/gen-status.sh b/bin/gen-status.sh index 8c7ae32e9..548d57f0d 100755 --- a/bin/gen-status.sh +++ b/bin/gen-status.sh @@ -409,7 +409,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -425,13 +425,13 @@ while getopts :hv:Vd:D:nNt:w: flag; do *"'"*) echo "$0: ERROR: in -t tagline, the tagline may not contain a single-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -t tagline, the tagline may not contain a double-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -445,7 +445,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/gen-top-html.sh b/bin/gen-top-html.sh index ef7fb08d2..ddab8b4a1 100755 --- a/bin/gen-top-html.sh +++ b/bin/gen-top-html.sh @@ -217,7 +217,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -233,13 +233,13 @@ while getopts :hv:Vd:D:nNt:w: flag; do *"'"*) echo "$0: ERROR: in -t tagline, the tagline may not contain a single-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -t tagline, the tagline may not contain a double-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -253,7 +253,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/gen-year-index.sh b/bin/gen-year-index.sh index c3b4cdf9e..38e684cb6 100755 --- a/bin/gen-year-index.sh +++ b/bin/gen-year-index.sh @@ -187,7 +187,7 @@ while getopts :hv:Vd:D:nNQt:w: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -206,13 +206,13 @@ while getopts :hv:Vd:D:nNQt:w: flag; do *"'"*) echo "$0: ERROR: in -t tagline, the tagline may not contain a single-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -t tagline, the tagline may not contain a double-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -226,7 +226,7 @@ while getopts :hv:Vd:D:nNQt:w: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/gen-years.sh b/bin/gen-years.sh index 906307f6e..c36345806 100755 --- a/bin/gen-years.sh +++ b/bin/gen-years.sh @@ -308,7 +308,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -324,13 +324,13 @@ while getopts :hv:Vd:D:nNt:w: flag; do *"'"*) echo "$0: ERROR: in -t tagline, the tagline may not contain a single-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -t tagline, the tagline may not contain a double-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -344,7 +344,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/md2html.sh b/bin/md2html.sh index 260933154..058680488 100755 --- a/bin/md2html.sh +++ b/bin/md2html.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash + # # md2html.sh - convert markdown into an IOCCC HTML file via config file # @@ -354,22 +355,6 @@ function global_variable_setup } -# print_usage - print the usage message, exit code and version information -# -# Call this to print the usage message, by default to stdout. -# However one might usually want to do: -# -# print_usage 1>&2 -# -function print_usage -{ - # print usage message - # - echo "$USAGE" - return 0 -} - - # parse_command_line - parse command line arguments # # You MUST call this function at least once AND after calling global_variable_setup. @@ -418,7 +403,7 @@ function parse_command_line # while getopts :hv:VnNd:D:c:H:t:m:b:a:s:So:U:w:e:E: flag; do case "$flag" in - h) print_usage 1>&2 + h) echo "$USAGE" 1>&2 exit 2 ;; v) V_FLAG="$OPTARG" @@ -434,7 +419,7 @@ function parse_command_line if [[ $GETOPT_PHASE -ne 0 ]]; then echo "$0: ERROR: -d may only be used during getopt phase 0, current getopt phase: $GETOPT_PHASE" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 fi # @@ -445,7 +430,7 @@ function parse_command_line */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -461,7 +446,7 @@ function parse_command_line if [[ $GETOPT_PHASE -ne 0 ]]; then echo "$0: ERROR: -c may only be used during getopt phase 0, current getopt phase: $GETOPT_PHASE" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 fi # @@ -475,7 +460,7 @@ function parse_command_line ;; *) echo "$0: ERROR: -H phase=name not in -H phase=name form" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -484,25 +469,25 @@ function parse_command_line *=*) echo "$0: ERROR: in -H phase=name, the phase may not contain an = (equal) character: $NAME" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; */*) echo "$0: ERROR: in -H phase=name, the phase may not contain a / (slash) character: $NAME" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *"'"*) echo "$0: ERROR: in -H phase=name, the phase may not contain a single-quote character: $NAME" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -H phase=name, the phase may not contain a double-quote character: $NAME" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -512,19 +497,19 @@ function parse_command_line *=*) echo "$0: ERROR: in -H phase=name, the name may not contain a = (equal) character: $VALUE" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *"'"*) echo "$0: ERROR: in -H phase=name, the name may not contain a single-quote character: $VALUE" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -H phase=name, the name may not contain a double-quote character: $VALUE" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -540,7 +525,7 @@ function parse_command_line done 1>&2 echo "$0: notice: list of valid end above" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 fi # change phase name @@ -576,7 +561,7 @@ function parse_command_line ;; *) echo "$0: ERROR: -s token=value not in -s token=value form" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -585,19 +570,19 @@ function parse_command_line *\;*) echo "$0: ERROR: in -s token=value, the token may not contain a ; (semicolon) character: $NAME" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *=*) echo "$0: ERROR: in -s token=value, the token may not contain an = (equal) character: $NAME" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *%*) echo "$0: ERROR: in -s token=value, the token may not contain a % (percent) character: $NAME" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -607,13 +592,13 @@ function parse_command_line *\;*) echo "$0: ERROR: in -s token=value, the value may not contain a ; (semicolon) character: $NAME" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *\&*) echo "$0: ERROR: in -s token=value, the value may not contain an & (ampersand) character: $NAME" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -629,7 +614,7 @@ function parse_command_line if [[ $GETOPT_PHASE -ne 0 && $GETOPT_PHASE -ne 2 ]]; then echo "$0: ERROR: -o may only be used during getopt phase 0 and 2, current getopt phase: $GETOPT_PHASE" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 fi # @@ -657,17 +642,17 @@ function parse_command_line ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) echo "$0: ERROR: unexpected value from getopts: $flag" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac diff --git a/bin/new-dir.sh b/bin/new-dir.sh index 57151673e..629615459 100755 --- a/bin/new-dir.sh +++ b/bin/new-dir.sh @@ -161,7 +161,7 @@ while getopts :hv:Vd:nN flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/new-year.sh b/bin/new-year.sh index 9edf389b4..b0d9e21ac 100755 --- a/bin/new-year.sh +++ b/bin/new-year.sh @@ -255,7 +255,7 @@ while getopts :hv:Vd:nN flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/othermd2html.sh b/bin/othermd2html.sh index 35a4a1efe..8310605ac 100755 --- a/bin/othermd2html.sh +++ b/bin/othermd2html.sh @@ -188,7 +188,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -205,13 +205,13 @@ while getopts :hv:Vd:D:nNt:w: flag; do *"'"*) echo "$0: ERROR: in -t tagline, the tagline may not contain a single-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -t tagline, the tagline may not contain a double-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -226,7 +226,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/output-index-author.sh b/bin/output-index-author.sh index 27f8d9def..dd478bb78 100755 --- a/bin/output-index-author.sh +++ b/bin/output-index-author.sh @@ -392,7 +392,7 @@ while getopts :hv:Vd:D:nNU:w:e:E: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -412,7 +412,7 @@ while getopts :hv:Vd:D:nNU:w:e:E: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/output-index-inventory.sh b/bin/output-index-inventory.sh index d35418b01..7d522467b 100755 --- a/bin/output-index-inventory.sh +++ b/bin/output-index-inventory.sh @@ -211,7 +211,7 @@ while getopts :hv:Vd:D:nNU:w:e:E: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/output-year-index.sh b/bin/output-year-index.sh index dd76b73fa..89a332ebb 100755 --- a/bin/output-year-index.sh +++ b/bin/output-year-index.sh @@ -316,7 +316,7 @@ while getopts :hv:Vd:D:nNU:w:e:E: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -336,7 +336,7 @@ while getopts :hv:Vd:D:nNU:w:e:E: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/quick-readme2index.sh b/bin/quick-readme2index.sh index 101132943..e20880527 100755 --- a/bin/quick-readme2index.sh +++ b/bin/quick-readme2index.sh @@ -199,7 +199,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -216,13 +216,13 @@ while getopts :hv:Vd:D:nNt:w: flag; do *"'"*) echo "$0: ERROR: in -t tagline, the tagline may not contain a single-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -t tagline, the tagline may not contain a double-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -237,7 +237,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/readme2index.sh b/bin/readme2index.sh index 7af3f61be..9a450c7a5 100755 --- a/bin/readme2index.sh +++ b/bin/readme2index.sh @@ -188,7 +188,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -205,13 +205,13 @@ while getopts :hv:Vd:D:nNt:w: flag; do *"'"*) echo "$0: ERROR: in -t tagline, the tagline may not contain a single-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *'"'*) echo "$0: ERROR: in -t tagline, the tagline may not contain a double-quote character: $OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; *) ;; @@ -226,7 +226,7 @@ while getopts :hv:Vd:D:nNt:w: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/sort.gitignore.sh b/bin/sort.gitignore.sh index c92476d13..0cd143999 100755 --- a/bin/sort.gitignore.sh +++ b/bin/sort.gitignore.sh @@ -179,7 +179,7 @@ while getopts :hv:Vd:nN flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/status2html.sh b/bin/status2html.sh index a7b5745c0..594610ea5 100755 --- a/bin/status2html.sh +++ b/bin/status2html.sh @@ -190,7 +190,7 @@ while getopts :hv:Vd:D:nNU:w:e:E: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -210,7 +210,7 @@ while getopts :hv:Vd:D:nNU:w:e:E: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/subst.default.sh b/bin/subst.default.sh index 898817c8b..20abac955 100755 --- a/bin/subst.default.sh +++ b/bin/subst.default.sh @@ -201,7 +201,7 @@ while getopts :hv:Vd:D:nNU:w:e:E: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/subst.entry-index.sh b/bin/subst.entry-index.sh index d8945d010..16da9a8f8 100755 --- a/bin/subst.entry-index.sh +++ b/bin/subst.entry-index.sh @@ -297,7 +297,7 @@ while getopts :hv:Vd:D:nNU:w:e:E: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -317,7 +317,7 @@ while getopts :hv:Vd:D:nNU:w:e:E: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/subst.year-index.sh b/bin/subst.year-index.sh index edcc62920..2ab0d2eb2 100755 --- a/bin/subst.year-index.sh +++ b/bin/subst.year-index.sh @@ -255,7 +255,7 @@ while getopts :hv:Vd:D:nNU:w:e:E: flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -275,7 +275,7 @@ while getopts :hv:Vd:D:nNU:w:e:E: flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/tar-entry.sh b/bin/tar-entry.sh index ec3cb032f..993bd421a 100755 --- a/bin/tar-entry.sh +++ b/bin/tar-entry.sh @@ -183,7 +183,7 @@ while getopts :hv:Vd:D:nNU:w:W flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/tar-year.sh b/bin/tar-year.sh index 49f9ad342..43af0cee4 100755 --- a/bin/tar-year.sh +++ b/bin/tar-year.sh @@ -183,7 +183,7 @@ while getopts :hv:Vd:D:nNU:w:W flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/unicode-chk.sh b/bin/unicode-chk.sh index c4840bf3c..d0ec87a0c 100755 --- a/bin/unicode-chk.sh +++ b/bin/unicode-chk.sh @@ -208,7 +208,7 @@ while getopts :hv:Vd:D:j:nN flag; do */) ;; *) echo "$0: ERROR: in -D docroot/, the docroot must end in /" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; esac @@ -220,7 +220,7 @@ while getopts :hv:Vd:D:j:nN flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/untar-entry.sh b/bin/untar-entry.sh index d5e4e4bef..ff292c207 100755 --- a/bin/untar-entry.sh +++ b/bin/untar-entry.sh @@ -182,7 +182,7 @@ while getopts :hv:Vd:D:nNU:w:W flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2 diff --git a/bin/untar-year.sh b/bin/untar-year.sh index 29e354b39..48c7e9733 100755 --- a/bin/untar-year.sh +++ b/bin/untar-year.sh @@ -181,7 +181,7 @@ while getopts :hv:Vd:D:nNU:w:W flag; do ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 - print_usage 1>&2 + echo "$USAGE" 1>&2 exit 3 ;; :) echo "$0: ERROR: option -$OPTARG requires an argument" 1>&2