From c17696341070555f83095be7b073cd64a18429c4 Mon Sep 17 00:00:00 2001 From: oech3 <> Date: Wed, 3 Dec 2025 15:58:56 +0900 Subject: [PATCH] build-gnu.sh: Support any commit of GNU coreutils --- .github/workflows/GnuTests.yml | 2 +- util/build-gnu.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index 55c57080821..c92f60954d3 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -180,7 +180,7 @@ jobs: - name: Extract GNU version from build-gnu.sh id: gnu-version-selinux run: | - GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2) + GNU_VERSION=$(grep '^release_tag_GNU_default=' uutils/util/build-gnu.sh | cut -d'"' -f2) if [ -z "$GNU_VERSION" ]; then echo "Error: Failed to extract GNU version from build-gnu.sh" exit 1 diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 532e905929d..3b5fa1d3c93 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -34,7 +34,9 @@ path_GNU="$("${READLINK}" -fm -- "${path_GNU:-${path_UUTILS}/../gnu}")" ### -release_tag_GNU="v9.9" +# Allow to run with any tags and commits +release_tag_GNU_default="v9.9" +: ${release_tag_GNU:="${release_tag_GNU_default}"} # check if the GNU coreutils has been cloned, if not print instructions # note: the ${path_GNU} might already exist, so we check for the .git directory @@ -45,7 +47,7 @@ if test ! -d "${path_GNU}/.git"; then echo "Afterwards, checkout the latest release tag:" echo " cd \"${path_GNU}\"" echo " git fetch --all --tags" - echo " git checkout tags/${release_tag_GNU}" + echo " git checkout ${release_tag_GNU}" exit 1 fi