Add -l option to install.sh
This commit is contained in:
11
install.sh
11
install.sh
@@ -156,6 +156,14 @@ function askNecessaryQuestions() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function printModulesToInstall() {
|
||||||
|
hio info 'Modules that will install are:'
|
||||||
|
for mod in "${modulesToInstall[@]}"; do
|
||||||
|
hio debug "${mod}"
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
eval "`docopts -f -V - -h - : "$@" <<- USAGE
|
eval "`docopts -f -V - -h - : "$@" <<- USAGE
|
||||||
Usage: $0 [options] [<module>...]
|
Usage: $0 [options] [<module>...]
|
||||||
@@ -165,6 +173,8 @@ function main() {
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
-i, --inverse Exclude the given <module> instead.
|
-i, --inverse Exclude the given <module> instead.
|
||||||
|
-l, --list List modules that are going to be installed and exit without
|
||||||
|
installation.
|
||||||
----
|
----
|
||||||
$0 0.1.0
|
$0 0.1.0
|
||||||
Copyright (C) 2022 Rezart Qelibari, Astzweig GmbH & Co. KG
|
Copyright (C) 2022 Rezart Qelibari, Astzweig GmbH & Co. KG
|
||||||
@@ -174,6 +184,7 @@ function main() {
|
|||||||
filterModules
|
filterModules
|
||||||
ensureDocopts
|
ensureDocopts
|
||||||
autoloadZShLib
|
autoloadZShLib
|
||||||
|
[ "${list}" = true ] && printModulesToInstall
|
||||||
askNecessaryQuestions
|
askNecessaryQuestions
|
||||||
hio debug "Current working dir is: `pwd`"
|
hio debug "Current working dir is: `pwd`"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user