From: Michael Tremer Date: Wed, 29 Jan 2020 10:59:21 +0000 (+0100) Subject: make.sh: Modify update-contributors so that it will run with older version of awk X-Git-Tag: v2.25-core141~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e2338aa7ef6936044b6782fdbdd6abc12738395c;p=ipfire-2.x.git make.sh: Modify update-contributors so that it will run with older version of awk Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/credits.cgi b/html/cgi-bin/credits.cgi index 6eb7f1e49e..f4f22e1a2e 100644 --- a/html/cgi-bin/credits.cgi +++ b/html/cgi-bin/credits.cgi @@ -85,8 +85,8 @@ Ersan Yildirim, Stephan Feddersen, Joern-Ingo Weigert, Alexander Koch, -Wolfgang Apolinarski, Stéphane Pautrel, +Wolfgang Apolinarski, Alfred Haas, Lars Schuhmacher, Rene Zingel, diff --git a/make.sh b/make.sh index 452284c16c..02043cf69c 100755 --- a/make.sh +++ b/make.sh @@ -897,9 +897,14 @@ update_contributors() { local contributors="$(contributors | paste -sd , - | sed -e "s/,/&\\\\n/g")" # Edit contributors into credits.cgi - awk -i inplace \ - "//{ p=1; print; printf \"${contributors}\n\"}//{ p=0 } !p" \ - "${BASEDIR}/html/cgi-bin/credits.cgi" + local tmp="$(mktemp)" + + awk "//{ p=1; print; printf \"${contributors}\n\"}//{ p=0 } !p" \ + < "${BASEDIR}/html/cgi-bin/credits.cgi" > "${tmp}" + + # Copy back modified content + cat "${tmp}" > "${BASEDIR}/html/cgi-bin/credits.cgi" + unlink "${tmp}" print_status DONE return 0