Created
June 14, 2016 20:49
-
-
Save Voronenko/43ef809e846b8647889a1eb224809c74 to your computer and use it in GitHub Desktop.
Portions of the script which checks software for presence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# check requirements | |
REQS=( curl jq ) | |
for REQ in ${REQS[@]} | |
do | |
which ${REQ} >/dev/null | |
if [ ! $? -eq 0 ]; then | |
echo "requirement ${REQ} is missing" | |
exit 1 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment