Change If132a94e53545d9134859aa508da7b9819ede2f8 introduced a small
regression; it added an "inidelete" which looks in the config file to
delete rows.
However, at least for the test-case, the config file isn't created
yet. The end result is that the test fails but we don't notice.
2015-04-17 00:55:03.169 | merge_config_file test-multiline: sed: can't read test-multiline.conf: No such file or directory
2015-04-17 00:55:03.195 | OK
So fix this up by creating the config-file if it isn't there.
Also, add "-e" to the test file so we catch things like this in the
future.
Change-Id: I43a4ecc247f19cccf51d5931dfb687adbd23d6b1
| ... | ... |
@@ -86,6 +86,14 @@ function merge_config_file {
|
| 86 | 86 |
local matchgroup=$2 |
| 87 | 87 |
local configfile=$3 |
| 88 | 88 |
|
| 89 |
+ # note, configfile might be a variable (note the iniset, etc |
|
| 90 |
+ # created in the mega-awk below is "eval"ed too, so we just leave |
|
| 91 |
+ # it alone. |
|
| 92 |
+ local real_configfile=$(eval echo $configfile) |
|
| 93 |
+ if [ ! -f $real_configfile ]; then |
|
| 94 |
+ touch $real_configfile |
|
| 95 |
+ fi |
|
| 96 |
+ |
|
| 89 | 97 |
get_meta_section $file $matchgroup $configfile | \ |
| 90 | 98 |
$CONFIG_AWK_CMD -v configfile=$configfile ' |
| 91 | 99 |
BEGIN {
|