Skip to content

Instantly share code, notes, and snippets.

@avnerbarr
Created November 20, 2016 11:35
Show Gist options
  • Save avnerbarr/fcca836f6fbd08660a9803cd1e79ee4e to your computer and use it in GitHub Desktop.
Save avnerbarr/fcca836f6fbd08660a9803cd1e79ee4e to your computer and use it in GitHub Desktop.
Checks if a tool exists
set -e
if ! which <your tool> > /dev/null; then
echo "error: <your tool> is missing"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment