Merge "Use "type" to take place of "which" and update the output"

This commit is contained in:
Jenkins 2016-09-16 09:24:48 +00:00 committed by Gerrit Code Review
commit 2cf3f65bc9

View File

@ -12,9 +12,13 @@ unset LANGUAGE
LC_ALL=C
export LC_ALL
for i in curl nova neutron openstack; do
if [[ ! $(which $i) ]]; then
if [[ ! $(type $i 2>/dev/null) ]]; then
if [ "$i" == 'curl' ]; then
echo "$i not installed. Please install $i before proceeding"
exit 1
else
echo "python-${i}client not installed. Please install python-${i}client before proceeding"
fi
exit
fi
done
# Move to top level directory