Skip to content

Instantly share code, notes, and snippets.

@detj
Last active December 24, 2015 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save detj/6824968 to your computer and use it in GitHub Desktop.
Save detj/6824968 to your computer and use it in GitHub Desktop.
Install aws cli tools.Tests if comamnds are available. If not echo error
#!/bin/bash
# Make executable
chmod +x $0;
###########
# Helpers #
###########
# test availability of the command
function test {
"$@" > /dev/null 2>&1
status=$?
if [ $status -ne 0 ]; then
echo "$1 is not installed"
fi
}
test python --version
test easy_install --help
# Install awscli using easy_install
easy_install awscli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment