Add debugging output for active modules
This commit is contained in:
@@ -86,13 +86,13 @@ print_help() {
|
|||||||
OPTIONS:
|
OPTIONS:
|
||||||
--project, -p PROJECT
|
--project, -p PROJECT
|
||||||
PROJECT should follow the pattern ${PROJECT_PREFIX}_PROJECT_NAME
|
PROJECT should follow the pattern ${PROJECT_PREFIX}_PROJECT_NAME
|
||||||
--module, -i MODULE
|
--module, -i MODULE[,MODULE...]
|
||||||
See MODULES section below for list of available modules
|
See MODULES section below for list of available modules
|
||||||
If no --include is specified, all modules are run
|
If no --include is specified, all modules are run
|
||||||
--submodule, -s SUBMODULE "[ARG1],[ARG2]..." (string of comma delimited arguments)
|
--submodule, -s SUBMODULE "[ARG1],[ARG2]..." (string of comma delimited arguments)
|
||||||
See SUBMODULES section below for list of available modules
|
See SUBMODULES section below for list of available modules
|
||||||
See documentation for submodule argument usage
|
See documentation for submodule argument usage
|
||||||
--nomodule, -n MODULE
|
--nomodule, -n MODULE[,MODULE...]
|
||||||
See MODULES and SUBMODULES section below for list of modules to exclude
|
See MODULES and SUBMODULES section below for list of modules to exclude
|
||||||
--markdown
|
--markdown
|
||||||
Generate the shdoc markdown README.md file for this program
|
Generate the shdoc markdown README.md file for this program
|
||||||
@@ -332,8 +332,8 @@ print_header() {
|
|||||||
# Let user choose project(s)
|
# Let user choose project(s)
|
||||||
if [[ -z ${PROJECTS[*]} ]]; then
|
if [[ -z ${PROJECTS[*]} ]]; then
|
||||||
num=$((${#projects[@]}))
|
num=$((${#projects[@]}))
|
||||||
echo "Enter project #'s to run (comma delimited)"
|
echo "Enter comma delimited project #'s (from list) to analyze"
|
||||||
read -r -p "Or hit enter to add a new project" response
|
read -r -p "Or hit Enter to add a new project" response
|
||||||
[[ -z $response ]] && ask_pn && PROJECTS+=("${ADD_PROJECTS[@]}")
|
[[ -z $response ]] && ask_pn && PROJECTS+=("${ADD_PROJECTS[@]}")
|
||||||
((YES)) || read -r -p "Hit enter for default ($num): " response
|
((YES)) || read -r -p "Hit enter for default ($num): " response
|
||||||
[[ -z $response ]] && response=$num
|
[[ -z $response ]] && response=$num
|
||||||
@@ -346,7 +346,7 @@ print_header() {
|
|||||||
|
|
||||||
if [[ -z ${MODULES[*]} && -z ${INCLUDE_MODULES[*]} && -z ${EXCLUDE_MODULES[*]} ]]; then
|
if [[ -z ${MODULES[*]} && -z ${INCLUDE_MODULES[*]} && -z ${EXCLUDE_MODULES[*]} ]]; then
|
||||||
echo "Enter module #'s to run (by #, comma delimited)"
|
echo "Enter module #'s to run (by #, comma delimited)"
|
||||||
((YES)) || read -r -p "Hit enter for default (ALL): " response
|
((YES)) || read -r -p "Or hit Enter for default (ALL): " response
|
||||||
if [[ -n $response ]]; then
|
if [[ -n $response ]]; then
|
||||||
IFS=',' read -ra arr <<< "$response"
|
IFS=',' read -ra arr <<< "$response"
|
||||||
for i in "${arr[@]}"; do
|
for i in "${arr[@]}"; do
|
||||||
@@ -360,11 +360,10 @@ print_header() {
|
|||||||
while :; do
|
while :; do
|
||||||
echo "Enter a submodule followed by its arguments as a case delimited string in quotes"
|
echo "Enter a submodule followed by its arguments as a case delimited string in quotes"
|
||||||
echo "Example: ${ALL_SUBMODULES[0]} \"arg1,arg2,arg3...\""
|
echo "Example: ${ALL_SUBMODULES[0]} \"arg1,arg2,arg3...\""
|
||||||
read -r -p "Or hit Enter to continue: " response
|
((YES)) || read -r -p "Or hit Enter to continue: " response
|
||||||
[[ -z $response ]] && break
|
[[ -z $response ]] && break
|
||||||
IFS=' ' read -ra arr <<< "$response"
|
IFS=' ' read -ra arr <<< "$response"
|
||||||
if [[ ! ${#arr[@]} -eq 2 ]]; then
|
if [[ ! ${#arr[@]} -eq 2 ]]; then
|
||||||
err "Enter a submodule name followed by its arguments as a case delimited string in quotes"
|
|
||||||
err "The second argument is required and may be an empty string, \"\""
|
err "The second argument is required and may be an empty string, \"\""
|
||||||
else
|
else
|
||||||
SUBMODULES+=("${arr[@]}")
|
SUBMODULES+=("${arr[@]}")
|
||||||
@@ -1727,6 +1726,9 @@ main() {
|
|||||||
STUDY_TEMPLATE_DIR STUDY_INFO_FILE
|
STUDY_TEMPLATE_DIR STUDY_INFO_FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
debug "Active modules: ${MODULES[*]}"
|
||||||
|
debug "Active submodules and their args: ${SUBMODULES[*]}"
|
||||||
|
|
||||||
# Run selected modules
|
# Run selected modules
|
||||||
for m in "${MODULES[@]}"; do
|
for m in "${MODULES[@]}"; do
|
||||||
ask "Run $m module?" && "$m"
|
ask "Run $m module?" && "$m"
|
||||||
|
|||||||
Reference in New Issue
Block a user