Fix ordering of library function call and include of library #68

Fix validation bool function and turn on halt and exit flag `set -e` to guard against regression.
This commit is contained in:
Andrew Walsh 2022-11-24 08:59:56 -08:00 committed by GitHub
parent 982de21c87
commit 9bc3e210f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,15 +1,17 @@
#!/bin/bash #!/bin/bash
set -e
# Include library.
script_dir="$(dirname -- "$(realpath -- "${0}")")"
source "${script_dir}/lib.sh"
# Debug mode for diagnosing issues. # Debug mode for diagnosing issues.
# Setup first before other operations. # Setup first before other operations.
debug="${4}" debug="${4}"
validate_bool "${debug}" debug 1 validate_bool "${debug}" debug 1
test ${debug} == "true" && set -x test ${debug} == "true" && set -x
# Include library.
script_dir="$(dirname -- "$(realpath -- "${0}")")"
source "${script_dir}/lib.sh"
# Directory that holds the cached packages. # Directory that holds the cached packages.
cache_dir="${1}" cache_dir="${1}"