From 42ce18c78e2c994d24b074dd674fcffc9125d66c Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 30 May 2026 00:20:19 +0000 Subject: [PATCH] patch-nexus.sh: URL-Escaping in gradle-wrapper.properties korrigiert sed konsumiert '\' im Replacement; awk erledigt das korrekt (gsub ersetzt ':' durch '\:' bevor die Zeile ausgegeben wird). Co-Authored-By: Claude Sonnet 4.6 --- patch-nexus.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/patch-nexus.sh b/patch-nexus.sh index ce42c422..4a1a41b0 100755 --- a/patch-nexus.sh +++ b/patch-nexus.sh @@ -90,7 +90,12 @@ if [ "$GRADLE_DIST_URL" != "" ]; then for file in */*/gradle/wrapper/gradle-wrapper.properties; do [ -f "$file" ] || continue echo " $file" - sed -i "s|distributionUrl=.*|distributionUrl=${GRADLE_DIST_URL}|" "$file" + # In .properties-Dateien muss ':' als '\:' escaped werden; awk erledigt das sauber + awk -v url="$GRADLE_DIST_URL" ' + BEGIN { gsub(/:/, "\\:", url) } + /^distributionUrl=/ { print "distributionUrl=" url; next } + { print } + ' "$file" > "$file.tmp" && mv "$file.tmp" "$file" done fi -- 2.39.5