Skip to content

Instantly share code, notes, and snippets.

@renzok
Created April 17, 2016 21:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save renzok/eaeb02da7640868810bbe11d993e149f to your computer and use it in GitHub Desktop.
Save renzok/eaeb02da7640868810bbe11d993e149f to your computer and use it in GitHub Desktop.
checks if progs are available
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