Pass arg $0 to module_main

This commit is contained in:
Rezart Qelibari
2022-02-17 15:58:52 +01:00
parent ead076a8e0
commit 90758b2fdd
2 changed files with 9 additions and 7 deletions

View File

@@ -35,10 +35,12 @@ function showQuestions() {
}
function module_main() {
local cmdName=${1:t}
shift
autoloadZShLib || return
checkPrerequisites || return
eval "`getUsage | docopts -f -V - -h - : "$@"`"
[ $# -le 1 ] && return
eval "`getUsage $cmdName | docopts -f -V - -h - : "$@"`"
[ $# -lt 1 ] && return
configureLogging
[ "${show_questions}" = true ] && { showQuestions; return }
configure_system