2
2
# Load our configuration files
3
3
# Copyright (c) 2023 Ismo Vuorinen. All Rights Reserved.
4
4
5
- set -euo pipefail
6
-
7
- # Set verbosity with VERBOSE=1 x-load-configs
5
+ # Enable verbosity with VERBOSE=1 x-load-configs
8
6
VERBOSE=" ${VERBOSE:= 0} "
7
+ # Enable debugging with DEBUG=1 x-load-configs
8
+ DEBUG=" ${DEBUG:= 0} "
9
9
10
- [ " $VERBOSE " = " 1" ] && {
10
+ [ " $DEBUG " = " 1" ] && {
11
11
set -x
12
12
}
13
13
@@ -37,7 +37,7 @@ loadConfigFiles()
37
37
HOST_FILE=$CONFIG_FILE -$HOST
38
38
SECRET_HOST=$HOST_FILE -secret
39
39
40
- [ " $VERBOSE " = " 1" ] && configMsg " ? " " $CONFIG_FILE "
40
+ [ " $VERBOSE " = " 1" ] && configMsg " Looking for " " $CONFIG_FILE "
41
41
42
42
# global (exports|alias|functions) FILENAME for all hosts
43
43
# shellcheck source=../config/exports
@@ -47,19 +47,19 @@ loadConfigFiles()
47
47
48
48
# global secret FILENAME, git ignored
49
49
# shellcheck source=../config/exports-secret
50
- [ " $VERBOSE " = " 1" ] && configMsg " ? " " $SECRET_FILE "
50
+ [ " $VERBOSE " = " 1" ] && configMsg " Looking for " " $SECRET_FILE "
51
51
[ -r " $SECRET_FILE " ] && {
52
52
source " $SECRET_FILE " && [ " $VERBOSE " = " 1" ] && configMsg " Found" " $SECRET_FILE "
53
53
}
54
54
# host specific (exports|alias|functions) FILENAME
55
55
# shellcheck source=../config/exports
56
- [ " $VERBOSE " = " 1" ] && configMsg " ? " " $HOST_FILE "
56
+ [ " $VERBOSE " = " 1" ] && configMsg " Looking for " " $HOST_FILE "
57
57
[ -r " $HOST_FILE " ] && {
58
58
source " $HOST_FILE " && [ " $VERBOSE " = " 1" ] && configMsg " Found" " $HOST_FILE "
59
59
}
60
60
# host specific (exports|alias|functions) FILENAME, git ignored
61
61
# shellcheck source=../config/exports
62
- [ " $VERBOSE " = " 1" ] && configMsg " ? " " $SECRET_HOST "
62
+ [ " $VERBOSE " = " 1" ] && configMsg " Looking for " " $SECRET_HOST "
63
63
[ -r " $SECRET_HOST " ] && {
64
64
source " $SECRET_HOST " \
65
65
&& [ " $VERBOSE " = " 1" ] && configMsg " Found" " $SECRET_HOST "
0 commit comments