From 74338a6fad2f9bdc76809cbe70f6c1be92bbb6a8 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Wed, 28 Jan 2026 13:53:49 +0000 Subject: [PATCH] Fix unbound variable from get_ocp_docs.sh Trivial fix for the get_ocp_docs.sh script, trying to use it without setting the OLS_DOC_REPO and OCP_VERSIONS explicitly failed with an "unbound variable" error instead of fallbacking to the default values. Signed-off-by: Lucas Alvares Gomes --- scripts/get_ocp_docs.sh | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/scripts/get_ocp_docs.sh b/scripts/get_ocp_docs.sh index 71ce124..d8e4e9d 100755 --- a/scripts/get_ocp_docs.sh +++ b/scripts/get_ocp_docs.sh @@ -14,11 +14,12 @@ set -eou pipefail set -x -SCRIPT_DIR="$(realpath "$( dirname -- "${BASH_SOURCE[0]}" )")" +OLS_DOC_REPO=${OLS_DOC_REPO:-"https://github.com/openshift/lightspeed-rag-content.git"} +# OpenShift Versions to create DBs for +# If we set it to empty string, it will generate all the available ones. +OCP_VERSIONS=${OCP_VERSIONS:-"4.16 4.18 latest"} -if [[ -z "${OLS_DOC_REPO}" ]]; then - OLS_DOC_REPO="https://github.com/openshift/lightspeed-rag-content.git" -fi +SCRIPT_DIR="$(realpath "$( dirname -- "${BASH_SOURCE[0]}" )")" # The current directory where the script was invoked CURR_DIR=$(pwd) @@ -29,13 +30,6 @@ if [[ $OUTPUT_DIR_NAME != /* ]]; then OUTPUT_DIR_NAME="${CURR_DIR}/${OUTPUT_DIR_NAME}" fi -# OpenShift Versions to create DBs for -# If we set it to empty string, it will generate all the available ones. -_OCP_VERSIONS="4.16 4.18 latest" -if [[ -z "${OCP_VERSIONS}" ]]; then - OCP_VERSIONS=${_OCP_VERSIONS} -fi - # Working directory WORKING_DIR="${WORKING_DIR:-/tmp/ocp_docs_temp}"