Repository: climate
Updated Branches:
  refs/heads/master b440baf69 -> 397da97ce


CLIMATE-571 - Change Easy-OCW checks for installed applications

- Change the structuring of the 'command' calls to check for installed
  applications that are necessary for parts of the installation. This
  should prevent false positives that lead to other errors later on.


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/f0e23050
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/f0e23050
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/f0e23050

Branch: refs/heads/master
Commit: f0e230506c163eaaaea513ade3395d028c29058d
Parents: b440baf
Author: Michael Joyce <[email protected]>
Authored: Thu Jan 22 09:20:04 2015 -0800
Committer: Michael Joyce <[email protected]>
Committed: Thu Jan 22 09:20:04 2015 -0800

----------------------------------------------------------------------
 easy-ocw/install-osx.sh    | 8 ++++----
 easy-ocw/install-ubuntu.sh | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/f0e23050/easy-ocw/install-osx.sh
----------------------------------------------------------------------
diff --git a/easy-ocw/install-osx.sh b/easy-ocw/install-osx.sh
index ca7581f..507154a 100755
--- a/easy-ocw/install-osx.sh
+++ b/easy-ocw/install-osx.sh
@@ -107,7 +107,7 @@ read -p "Press [ENTER] to begin installation ..."
 fi
 
 header "Checking for pip ..."
-if [ ! command -v pip >/dev/null 2>&1 ]; then
+command -v pip >/dev/null 2>&1 || { 
     task "Unable to locate pip."
     task "Installing Distribute"
     curl http://python-distribute.org/distribute_setup.py | python >> 
install_log
@@ -119,17 +119,17 @@ if [ ! command -v pip >/dev/null 2>&1 ]; then
     cd pip-1.2.1/
     python setup.py install >> install_log
     subtask "done"
-fi
+}
 
 if [ $WITH_VIRTUAL_ENV == 1 ]; then
     header "Setting up a virtualenv ..."
 
     # Check if virtualenv is installed. If it's not, we'll install it for the 
user.
-    if ! command -v virtualenv >/dev/null 2>&1; then
+    command -v virtualenv >/dev/null 2>&1 || { 
         task "Installing virtualenv ..."
         pip install virtualenv >> install_log
         subtask "done"
-    fi
+    }
 
     header "Checking for previously installed  ocw virtual environment..."
     if [ -e ~/ocw/bin/python ]; then

http://git-wip-us.apache.org/repos/asf/climate/blob/f0e23050/easy-ocw/install-ubuntu.sh
----------------------------------------------------------------------
diff --git a/easy-ocw/install-ubuntu.sh b/easy-ocw/install-ubuntu.sh
index 637f0e8..1783cc8 100755
--- a/easy-ocw/install-ubuntu.sh
+++ b/easy-ocw/install-ubuntu.sh
@@ -110,22 +110,22 @@ read ocw_path
 fi
 
 header "Checking for pip ..."
-if [ ! command -v pip >/dev/null 2>&1 ]; then
+command -v pip >/dev/null 2>&1 || { 
     task "Unable to locate pip."
     task "Installing Pip"
     sudo apt-get install python-pip >> install_log
     subtask "done"
-fi
+}
 
 if [ $WITH_VIRTUAL_ENV == 1 ]; then
     header "Setting up a virtualenv ..."
 
     # Check if virtualenv is installed. If it's not, we'll install it for the 
user.
-    if ! command -v virtualenv >/dev/null 2>&1; then
+    command -v virtualenv >/dev/null 2>&1 || { 
         task "Installing virtualenv ..."
         sudo apt-get install -y python-virtualenv >> install_log
         subtask "done"
-    fi
+    }
 
     # Create a new environment for OCW work
     task "Creating a new environment ..."

Reply via email to