Browse code

Fix inverted conditionals in setup_develop

This fixes regressions introduced by:
Change-Id: Ic97e68348f46245b271567893b447fcedbd7bd6e
("Handle non-zero exit code from git diff")

Change-Id: I053a292c287f3035eef37db2264eda06a170f9bc
Closes-Bug: 1287513

YAMAMOTO Takashi authored on 2014/02/24 20:30:07
Showing 1 changed files
... ...
@@ -1248,7 +1248,7 @@ function setup_develop {
1248 1248
     # ``errexit`` requires us to trap the exit code when the repo is changed
1249 1249
     local update_requirements=$(cd $project_dir && git diff --exit-code >/dev/null || echo "changed")
1250 1250
 
1251
-    if [[ $update_requirements = "changed" ]]; then
1251
+    if [[ $update_requirements != "changed" ]]; then
1252 1252
         (cd $REQUIREMENTS_DIR; \
1253 1253
             $SUDO_CMD python update.py $project_dir)
1254 1254
     fi
... ...
@@ -1264,7 +1264,7 @@ function setup_develop {
1264 1264
     # a variable that tells us whether or not we should UNDO the requirements
1265 1265
     # changes (this will be set to False in the OpenStack ci gate)
1266 1266
     if [ $UNDO_REQUIREMENTS = "True" ]; then
1267
-        if [[ $update_requirements = "changed" ]]; then
1267
+        if [[ $update_requirements != "changed" ]]; then
1268 1268
             (cd $project_dir && git reset --hard)
1269 1269
         fi
1270 1270
     fi