Experimental package creation tool for MinGW.org
Revision | 5abdb0c858980d36464eac8d3c2ffed1da4a4db6 (tree) |
---|---|
Time | 2022-03-09 06:58:56 |
Author | Keith Marshall <keith@user...> |
Commiter | Keith Marshall |
Avoid duplication of diagnostic message functions.
* src/modules/config.sh (bold, unbold, error_colour, warning_colour)
(warning, error): Delete definitions; import them by requiring...
* src/modules/dmh.sh: ...this instead.
@@ -30,24 +30,10 @@ | ||
30 | 30 | # |
31 | 31 | # ----------------------------------------------------------------------------- |
32 | 32 | # |
33 | -# ANSI terminal control sequences to select/reset bold output... | |
34 | -# | |
35 | - bold="`echo '^[[1m' | tr -s '^[' '\033['`" | |
36 | - unbold="`echo '^[[30;0m' | tr -s '^[' '\033['`" | |
37 | - | |
38 | -# ...and for selecting coloured output for diagnostic messages. | |
39 | -# | |
40 | - error_colour="`echo '^[[31;1m' | tr -s '^[' '\033['`" | |
41 | - warning_colour="`echo '^[[31m' | tr -s '^[' '\033['`" | |
42 | - | |
43 | -# Use them, to implement the diagnostic message functions. | |
44 | -# | |
45 | - warning() { echo >&2 "$warning_colour$cmd: *** WARNING *** $@$unbold"; } | |
46 | - error() { echo >&2 "$error_colour$cmd: *** ERROR *** $@$unbold"; } | |
47 | - | |
48 | 33 | # Configure the core application functionality. |
49 | 34 | # |
50 | - for name in actions options; do require module $name; done | |
35 | + local name | |
36 | + for name in dmh actions options; do require module $name; done | |
51 | 37 | |
52 | 38 | # Accept user specified customisation. |
53 | 39 | # |