#1485 closed Bug (fixed)
Unable to use add_key for multiple keys
Reported by: | timgraham | Owned by: | nemo |
---|---|---|---|
Priority: | normal | Milestone: | 2015 release-3.6 |
Component: | OCE | Version: | v3.6 |
Severity: | Keywords: | 2015 OPA v3.6 | |
Cc: |
Description
According to the makenemo help text it should be possible to add multiple keys using the following syntax:
./makenemo add_key "key_iomput key_mpp_mpi"
This results in the following error message (although makenemo continues to build the configuration without adding the keys):
./makenemo: line 203: [: key_iomput: binary operator expected
Commit History (1)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
5144 | timgraham | 2015-03-11T16:51:28+01:00 | Another fix required related to #1485 |
Change History (6)
comment:1 Changed 9 years ago by timgraham
comment:2 Changed 9 years ago by timgraham
- Resolution set to fixed
- Status changed from new to closed
The above syntax doesn't work if " " is passed as the argument. It ends up printing out all environment variables.
Instead the test needs to be:
[[ ! "$2" =~ ^\ +$ ]] && { list_add_key=$2; export ${list_add_key}; }
This checks that the string is not null and contains characters other than white space.
I've fixed this at r5142
comment:3 Changed 7 years ago by nicolasmartin
- Keywords 2015 nemo_v3_6* added
comment:4 Changed 6 years ago by nemo
- Keywords release-3.6* added; nemo_v3_6* removed
comment:5 Changed 6 years ago by nemo
- Keywords release-3.6* removed
comment:6 Changed 20 months ago by nemo
- Keywords OPA v3.6 added
I think this can be fixed by changing line 203 from:
to
Similarly for line 208. I'm testing the change now.