Created
September 18, 2018 00:00
-
-
Save mtdeguzis/a6464bff942934c64607698218590710 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# If specified value is true, return valid | |
# Else return invalid | |
# | |
# Allows concatenation via && and || | |
evaluate_boolean() { | |
if [ "${1}" == "True" ] || \ | |
[ "${1}" == "true" ] || \ | |
[ "${1}" == "1" ]; then | |
return 0 | |
else | |
return 1 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment