From 52286e8e581d0a4315e5a76e0bf3882d1848a551 Mon Sep 17 00:00:00 2001 From: Fabian Schiebel Date: Sun, 12 Apr 2026 13:45:52 +0200 Subject: [PATCH] Fix init-submodules-release.sh --- utils/init-submodules-release.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/utils/init-submodules-release.sh b/utils/init-submodules-release.sh index 31e4c9f3fd..a8860106a7 100755 --- a/utils/init-submodules-release.sh +++ b/utils/init-submodules-release.sh @@ -1,20 +1,20 @@ #!/bin/bash +set -euo pipefail -source ./safeCommandsSet.sh +if (git submodule status 2>&1 || true) | grep -iq "fatal: Not a git repository (or any of the parent directories): .git"; then + pushd "$(dirname "$0")"/../external/ -if git submodule status 2>&1 | grep -iq "fatal: Not a git repository (or any of the parent directories): .git"; then + git clone --no-checkout https://github.com/nlohmann/json.git + pushd json/ + git checkout v3.12.0 + popd -safe_cd "$(dirname "$0")"/../external/ + git clone --no-checkout https://github.com/pboettch/json-schema-validator.git + pushd json-schema-validator/ + git checkout 2.3.0 + popd -git clone --no-checkout https://github.com/nlohmann/json.git -safe_cd json/ -git checkout v3.11.3 -safe_cd - - -git clone --no-checkout https://github.com/pboettch/json-schema-validator.git -safe_cd json/ -git checkout 2.3.0 -safe_cd - - -else git submodule update --init; + popd +else + git submodule update --init; fi