`make tlok` outputs "FAIL\n" if the executable wasn't created
[sunny256-utils.git] / Lib / std / bash-tab
blobcdc68dc2a8362bf8b27c50c0ad4775f30f74a9ad
1 #!/usr/bin/env bash
3 #==============================================================================
4 # STDfilenameDTS
5 # File ID: STDuuidDTS
7 # [Description]
9 # Author: Øyvind A. Holm <sunny@sunbase.org>
10 # License: GNU General Public License version 2 or later.
11 #==============================================================================
13 progname=STDfilenameDTS
14 VERSION=0.0.0
16 ARGS="$(getopt -o "\
20 " -l "\
21 help,\
22 quiet,\
23 verbose,\
24 version,\
25 " -n "$progname" -- "$@")"
26 test "$?" = "0" || exit 1
27 eval set -- "$ARGS"
29 opt_help=0
30 opt_quiet=0
31 opt_verbose=0
33 while :; do
34 case "$1" in
35 -h|--help) opt_help=1; shift ;;
36 -q|--quiet) opt_quiet=$(($opt_quiet + 1)); shift ;;
37 -v|--verbose) opt_verbose=$(($opt_verbose + 1)); shift ;;
38 --version) echo $progname $VERSION; exit 0 ;;
39 --) shift; break ;;
40 *) echo $progname: Internal error >&2; exit 1 ;;
41 esac
42 done
43 opt_verbose=$(($opt_verbose - $opt_quiet))
45 if test "$opt_help" = "1"; then
46 test $opt_verbose -gt 0 && { echo; echo $progname $VERSION; }
47 cat <<END
49 Usage: $progname [options]
51 Options:
53 -h, --help
54 Show this help.
55 -q, --quiet
56 Be more quiet. Can be repeated to increase silence.
57 -v, --verbose
58 Increase level of verbosity. Can be repeated.
59 --version
60 Print version information.
62 END
63 exit 0
66 # vim: set ts=8 sw=8 sts=8 noet fo+=w tw=79 fenc=UTF-8 :