File 5854-Use-local-variable-in-case-1-gets-trashed.patch of Package erlang

From 67f4c08f84f4a94389940257a9764a7dcae2c41d Mon Sep 17 00:00:00 2001
From: Raimo Niskanen <raimo@erlang.org>
Date: Mon, 15 Jul 2024 17:16:23 +0200
Subject: [PATCH 4/5] Use local variable in case $1 gets trashed

---
 .github/scripts/release-docs.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.github/scripts/release-docs.sh b/.github/scripts/release-docs.sh
index be96eac08b..532845b9dc 100755
--- a/.github/scripts/release-docs.sh
+++ b/.github/scripts/release-docs.sh
@@ -1,13 +1,14 @@
 #!/bin/bash
 
-if [[ $1 < 27 ]]; then
+release=${1}
+if [[ ${release} < 27 ]]; then
     docker run -v $PWD/:/github otp "make release docs release_docs && make release_docs DOC_TARGETS='man html pdf' RELEASE_ROOT=/github/docs"
 else
     docker run -v $PWD/:/github otp "./otp_build download_ex_doc && make release docs release_docs && make release_docs DOC_TARGETS=html RELEASE_ROOT=/github/docs"
 fi
 sudo chown -R `whoami` docs
 cd docs
-if [[ $1 < 27 ]]; then
+if [[ ${release} < 27 ]]; then
     tar czf ../otp_doc_man.tar.gz man
     rm -rf man
 fi
-- 
2.35.3

openSUSE Build Service is sponsored by