diff --git a/modules/lib.sh b/modules/lib.sh index 666a541..f506326 100644 --- a/modules/lib.sh +++ b/modules/lib.sh @@ -40,22 +40,10 @@ function ensurePathOrLogError() { } } -function checkCommands() { - local cmd - for cmd in ${(k)cmds}; do - if ! which "${cmd}" >&! /dev/null; then - local comment='' - [ -n "${cmds[$cmd]}" ] && comment=" ${cmds[$cmd]}" - lop -- -e "This module needs ${cmd}${comment} to work." - return 11 - fi - done -} - function checkHelpPrerequisites() { local -A cmds getHelpPrerequisites || return - checkCommands + checkCommands ${(k)cmds} } function addDocoptsToCmds() { @@ -73,13 +61,13 @@ whence getHelpPrerequisites >&! /dev/null || function $_() { function checkQuestionsPrerequisites() { local -A cmds getQuestionsPrerequisites || return - checkCommands + checkCommands ${(k)cmds} } function checkExecPrerequisites() { local -A cmds getExecPrerequisites || return - checkCommands + checkCommands ${(k)cmds} } function showQuestions() { diff --git a/zshlib b/zshlib index a20db50..174bc62 160000 --- a/zshlib +++ b/zshlib @@ -1 +1 @@ -Subproject commit a20db501bde1c640c1faf0d51a366f004564814a +Subproject commit 174bc6280410ce15bff934c928eef06bc48c332b