diff options
Diffstat (limited to '')
-rw-r--r-- | common/check_tools.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/common/check_tools.sh b/common/check_tools.sh new file mode 100644 index 0000000..ba3640d --- /dev/null +++ b/common/check_tools.sh @@ -0,0 +1,11 @@ +# check for necessary tools + +_check_tools() { + for prog in $@ + do + if ! hash $prog 2>/dev/null ; then + echo "Error: This script needs '$prog'. Exiting..." >&2 + exit 1 + fi + done +} |