From 3b1f2e4e885559957a939f8a260b4cff9938bc80 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 24 Feb 2014 20:30:07 +0900 Subject: [PATCH] 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 --- functions-common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions-common b/functions-common index ed3d8832fd..90cd3dfa72 100644 --- a/functions-common +++ b/functions-common @@ -1248,7 +1248,7 @@ function setup_develop { # ``errexit`` requires us to trap the exit code when the repo is changed local update_requirements=$(cd $project_dir && git diff --exit-code >/dev/null || echo "changed") - if [[ $update_requirements = "changed" ]]; then + if [[ $update_requirements != "changed" ]]; then (cd $REQUIREMENTS_DIR; \ $SUDO_CMD python update.py $project_dir) fi @@ -1264,7 +1264,7 @@ function setup_develop { # a variable that tells us whether or not we should UNDO the requirements # changes (this will be set to False in the OpenStack ci gate) if [ $UNDO_REQUIREMENTS = "True" ]; then - if [[ $update_requirements = "changed" ]]; then + if [[ $update_requirements != "changed" ]]; then (cd $project_dir && git reset --hard) fi fi