Skip to content

Instantly share code, notes, and snippets.

@benvium
Created September 22, 2015 09:15
Show Gist options
  • Select an option

  • Save benvium/b8b39320c898e39a1b96 to your computer and use it in GitHub Desktop.

Select an option

Save benvium/b8b39320c898e39a1b96 to your computer and use it in GitHub Desktop.
Bash check app is installed (in this case imagemagick)
# Check imagemagick is installed
# http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script
command -v convert >/dev/null 2>&1 || { echo >&2 "I require imagemagick but it's not installed. Aborting."; exit 1; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment