Code Review
/
releng
/
global-jjb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
f325f0d
)
Use a more exact grep for fetching cfg options
04/11504/1
author
Thanh Ha
<thanh.ha@linuxfoundation.org>
Thu, 21 Jun 2018 21:21:07 +0000
(17:21 -0400)
committer
Thanh Ha
<thanh.ha@linuxfoundation.org>
Thu, 21 Jun 2018 21:33:42 +0000
(17:33 -0400)
Use an exact grep command to fetch cfg options so that an
option containing the same characters in another option does
not get parsed accidently.
Change-Id: I40f3fd883ab5245da35b911aef3fe9edbda88fe2
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
shell/jenkins-configure-clouds.sh
patch
|
blob
|
history
diff --git
a/shell/jenkins-configure-clouds.sh
b/shell/jenkins-configure-clouds.sh
index
3f7dd6a
..
ed03f5c
100644
(file)
--- a/
shell/jenkins-configure-clouds.sh
+++ b/
shell/jenkins-configure-clouds.sh
@@
-63,7
+63,7
@@
get_cfg() {
exit 1
fi
- cfg=$(grep "
${setting^^}
" "$cfg_file" | tail -1 | awk -F'=' '{print $2}')
+ cfg=$(grep "
^${setting^^}=
" "$cfg_file" | tail -1 | awk -F'=' '{print $2}')
cfg=${cfg:-"$default"}
echo "$cfg"
}