diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-09-16 09:24:48 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-09-16 09:24:48 +0000 |
| commit | 2cf3f65bc960663760f9068b9c59556fd1f909ef (patch) | |
| tree | 20e1f8de301b2ef0db560e6539a7bf80fface9d1 | |
| parent | a9641a6f5dbd33bf505e41fd198365bf01ace861 (diff) | |
| parent | d48cc50e9e56fac2d6cad6cf13cf37746014441a (diff) | |
| download | kolla-2cf3f65bc960663760f9068b9c59556fd1f909ef.tar.gz kolla-2cf3f65bc960663760f9068b9c59556fd1f909ef.zip | |
Merge "Use "type" to take place of "which" and update the output"
| -rwxr-xr-x | tools/init-runonce | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/init-runonce b/tools/init-runonce index 7946699f4..7fb50f738 100755 --- a/tools/init-runonce +++ b/tools/init-runonce @@ -12,10 +12,14 @@ unset LANGUAGE LC_ALL=C export LC_ALL for i in curl nova neutron openstack; do - if [[ ! $(which $i) ]]; then - echo "$i not installed. Please install $i before proceeding" - exit 1 - fi + if [[ ! $(type $i 2>/dev/null) ]]; then + if [ "$i" == 'curl' ]; then + echo "$i not installed. Please install $i before proceeding" + else + echo "python-${i}client not installed. Please install python-${i}client before proceeding" + fi + exit + fi done # Move to top level directory REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')") |
