From d602eafdc1f1ca3afb82ec1c6cabdfa31e63b7b1 Mon Sep 17 00:00:00 2001 From: Rezart Qelibari Date: Fri, 4 Feb 2022 15:06:39 +0100 Subject: [PATCH] Add -l option to install.sh --- install.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/install.sh b/install.sh index eaa89ac..a3b7ca4 100755 --- a/install.sh +++ b/install.sh @@ -156,6 +156,14 @@ function askNecessaryQuestions() { done } +function printModulesToInstall() { + hio info 'Modules that will install are:' + for mod in "${modulesToInstall[@]}"; do + hio debug "${mod}" + done + exit 0 +} + function main() { eval "`docopts -f -V - -h - : "$@" <<- USAGE Usage: $0 [options] [...] @@ -165,6 +173,8 @@ function main() { Options: -i, --inverse Exclude the given instead. + -l, --list List modules that are going to be installed and exit without + installation. ---- $0 0.1.0 Copyright (C) 2022 Rezart Qelibari, Astzweig GmbH & Co. KG @@ -174,6 +184,7 @@ function main() { filterModules ensureDocopts autoloadZShLib + [ "${list}" = true ] && printModulesToInstall askNecessaryQuestions hio debug "Current working dir is: `pwd`" }