Add -l option to install.sh

This commit is contained in:
Rezart Qelibari
2022-02-04 15:06:39 +01:00
parent 7943cf9c78
commit d602eafdc1

View File

@@ -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`"
} }