From 87737cc6b94d53ef91ccd4ce8492c348d97fe401 Mon Sep 17 00:00:00 2001 From: Andrew Hughes Date: Thu, 4 Apr 2024 03:46:46 +0100 Subject: [PATCH] generate_source_tarball.sh: Double-quote DEPTH reference (SC2086) - generate_source_tarball.sh: Avoid empty DEPTH reference while still appeasing shellcheck Related: RHEL-30946 --- java-21-openjdk.spec | 2 ++ scripts/generate_source_tarball.sh | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/java-21-openjdk.spec b/java-21-openjdk.spec index 160af5b..cb22ea8 100644 --- a/java-21-openjdk.spec +++ b/java-21-openjdk.spec @@ -2554,6 +2554,8 @@ cjc.mainProgram(args) - openjdk_news.sh: shellcheck: Remove x-prefixes since we use Bash (SC2268) - openjdk_news.sh: shellcheck: Remove deprecated egrep usage (SC2196) - generate_source_tarball.sh: Output values of new options WITH_TEMP and OPENJDK_LATEST +- generate_source_tarball.sh: Double-quote DEPTH reference (SC2086) +- generate_source_tarball.sh: Avoid empty DEPTH reference while still appeasing shellcheck - Related: RHEL-30946 * Sun Apr 14 2024 Andrew Hughes - 1:21.0.3.0.1-0.1.ea diff --git a/scripts/generate_source_tarball.sh b/scripts/generate_source_tarball.sh index 817adcc..ad163f3 100755 --- a/scripts/generate_source_tarball.sh +++ b/scripts/generate_source_tarball.sh @@ -221,11 +221,12 @@ else echo "Cloning ${VERSION} root repository from ${REPO_ROOT}" if realpath -q "${REPO_ROOT}"; then echo "Local path detected; not adding depth argument"; + DEPTH="--"; else DEPTH="--depth=1"; echo "Remote repository detected; adding ${DEPTH}"; fi - git clone ${DEPTH} -b "${VERSION}" "${REPO_ROOT}" "${VERSION}" + git clone -b "${VERSION}" "${DEPTH}" "${REPO_ROOT}" "${VERSION}" pushd "${VERSION}" TAR_TIME="$(git log --max-count 1 --format=%cI)" popd