Skip to content

Instantly share code, notes, and snippets.

@AlexZeitler
Last active October 3, 2020 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexZeitler/46f7acf0d69db92fc2a1b6fc9e04bcc4 to your computer and use it in GitHub Desktop.
Save AlexZeitler/46f7acf0d69db92fc2a1b6fc9e04bcc4 to your computer and use it in GitHub Desktop.
check_required_software.sh
function check_required_software() {
ERROR=""
! [ -x "$(command -v curl)" ] && ERROR="$ERROR- curl\n"
! [ -x "$(command -v jq)" ] && ERROR="$ERROR- jq\n"
if [ -n "$ERROR" ]; then
echo "Some software is missing to run this script."
echo "Please make sure that you've installed:"
echo $ERROR >&2
exit 1
fi
}
check_required_software
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment