Last active
October 3, 2020 13:06
-
-
Save AlexZeitler/46f7acf0d69db92fc2a1b6fc9e04bcc4 to your computer and use it in GitHub Desktop.
check_required_software.sh
This file contains 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
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