Skip to content

Instantly share code, notes, and snippets.

@Voronenko
Created June 14, 2016 20:49
Show Gist options
  • Save Voronenko/43ef809e846b8647889a1eb224809c74 to your computer and use it in GitHub Desktop.
Save Voronenko/43ef809e846b8647889a1eb224809c74 to your computer and use it in GitHub Desktop.
Portions of the script which checks software for presence
#!/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