Use = for string comparisons

Change I384e4c376076051e7a4a8b2d704107cbe3ac08ad introduced
comparisons of $DEVSTACK_PROJECT_FROM_GIT against a couple of
hardcoded string values in a bash [[ ]] expression, but incorrectly
used the -eq integer comparison operator. This seems to work under
normal circumstances, but actually breaks if the string value of the
variable contains a "." since the equivalence test tries to fail
early if it detects what it thinks is a float value (because it's
intended only for integers). Instead of -eq use = for string
comparisons here, because that's what the POSIX test(1) utility
mandates.

Change-Id: If33d7aea9142e650b57c0f58c14e2a4434e30bf0
This commit is contained in:
Jeremy Stanley 2017-10-05 19:32:31 +00:00
parent e473fdec13
commit 9d7be09fa9
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ PROJECTS="openstack/glance $PROJECTS"
PROJECTS="openstack/heat $PROJECTS"
PROJECTS="openstack/heat-cfntools $PROJECTS"
PROJECTS="openstack/heat-templates $PROJECTS"
if [[ "$DEVSTACK_GATE_HORIZON" -eq "1" || "$DEVSTACK_PROJECT_FROM_GIT" -eq "django_openstack_auth" || "$DEVSTACK_PROJECT_FROM_GIT" -eq "manila-ui" ]] ; then
if [[ "$DEVSTACK_GATE_HORIZON" -eq "1" || "$DEVSTACK_PROJECT_FROM_GIT" = "django_openstack_auth" || "$DEVSTACK_PROJECT_FROM_GIT" = "manila-ui" ]] ; then
PROJECTS="openstack/horizon $PROJECTS"
PROJECTS="openstack/django_openstack_auth $PROJECTS"
PROJECTS="openstack/manila-ui $PROJECTS"