Created
April 17, 2016 21:25
-
-
Save renzok/eaeb02da7640868810bbe11d993e149f to your computer and use it in GitHub Desktop.
checks if progs are available
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
function _check_required_programs() { | |
# Required program(s) | |
req_progs=(readlink xmllint xsltproc curl date sed) | |
for p in ${req_progs[@]}; do | |
hash "${p}" 2>&- || \ | |
{ echo >&2 " Required program \"${p}\" not installed or in search PATH."; | |
exit 1; | |
} | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment