Skip to content

Instantly share code, notes, and snippets.

@brpaz
Created January 21, 2015 09:21
Show Gist options
  • Save brpaz/f9529f4132f3afc38572 to your computer and use it in GitHub Desktop.
Save brpaz/f9529f4132f3afc38572 to your computer and use it in GitHub Desktop.
Bash snippet that checks if a package is installed. (in uses the which command) #bash
# check for EC2 API tools in $PATH
if ! which aws > /dev/null; then
echo_red 'Please install the AWS command-line tool and ensure it is in your $PATH.'
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment