diff --git a/shtdlib.sh b/shtdlib.sh index c620754..138ab06 100755 --- a/shtdlib.sh +++ b/shtdlib.sh @@ -1381,10 +1381,15 @@ EOF # This is mostly irrelevant when running in strict mode function required_argument { print_usage_function="${3:-print_usage}" - if [ -z "${!1}" ]; then - ${print_usage_function} - color_echo red "${2}" - exit 255 + if [ -n "${1:-}" ]; then + debug 10 "Processing required argument: ${1}" + if [ -z "${!1}" ]; then + ${print_usage_function} + color_echo red "${2}" + exit 255 + else + debug 10 "Argument: ${1} set to: ${!1}" + fi fi } @@ -2206,7 +2211,7 @@ function create_relative_archive { done # shellcheck disable=SC2068 - tar ${transformations[@]} "${verbose_flag}" "--${archive_operation}" --exclude-vcs --directory "${run_dir}" --file "${archive_path}" ${source_elements[@]} || exit_on_fail + tar ${transformations[@]} ${verbose_flag} --${archive_operation} --exclude-vcs --directory "${run_dir}" --file "${archive_path}" ${source_elements[@]} || exit_on_fail } # Given a filename it will sign the file with the default key @@ -2249,6 +2254,7 @@ function get_git_status { # Reads bash files and inlines any "source" references to a new file # If second parameter is empty or "-" the new file is printed to stdout +# Explicit inlines can be defined using "#inline_source path_to_file" declare -a processed_inline_sources=() function inline_bash_source { local inline_source_file="${1}" @@ -2263,7 +2269,13 @@ function inline_bash_source { local i for (( i=1; i