Improve module regex.

The pattern was too generous and matching multiple module lines.

Change-Id: I8ba95aeb913783139f544f85586dbae73a6bfb8f
Reviewed-on: https://review.openstack.org/14234
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
James E. Blair 2012-10-09 09:45:23 -07:00 committed by Jenkins
parent 50602809e5
commit 8001eedbea

View File

@ -59,7 +59,7 @@ fi
for MOD in ${!MODULES[*]} ; do
# If the module at the current version does not exist upgrade or install it.
if ! echo $MODULE_LIST | grep "$MOD.*${MODULES[$MOD]}" >/dev/null 2>&1
if ! echo $MODULE_LIST | grep "$MOD ([^v]*v${MODULES[$MOD]}" >/dev/null 2>&1
then
# Attempt module upgrade. If that fails try installing the module.
if ! puppet module upgrade $MOD --version ${MODULES[$MOD]} >/dev/null 2>&1