Additional check for location of awscli

This commit is contained in:
C.J
2021-01-12 11:03:30 -05:00
parent eac59cade8
commit f53a32ae26

View File

@@ -12,8 +12,11 @@
# specific language governing permissions and limitations under the License.
# AWS-CLI detector variable
AWSCLI=$(which aws)
if [ -z "${AWSCLI}" ]; then
if [ ! -z $(which aws) ]; then
AWSCLI=$(which aws)
elif [ ! -z $(type -p aws) ]; then
AWSCLI=$(type -p aws)
else
echo -e "\n$RED ERROR!$NORMAL AWS-CLI (aws command) not found. Make sure it is installed correctly and in your \$PATH\n"
EXITCODE=1
exit $EXITCODE