make.sh: Modify update-contributors so that it will run with older version of awk

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2020-01-29 11:59:21 +01:00
parent 8729316513
commit e2338aa7ef
2 changed files with 9 additions and 4 deletions

View File

@@ -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,

11
make.sh
View File

@@ -897,9 +897,14 @@ update_contributors() {
local contributors="$(contributors | paste -sd , - | sed -e "s/,/&\\\\n/g")"
# Edit contributors into credits.cgi
awk -i inplace \
"/<!-- CONTRIBUTORS -->/{ p=1; print; printf \"${contributors}\n\"}/<!-- END -->/{ p=0 } !p" \
"${BASEDIR}/html/cgi-bin/credits.cgi"
local tmp="$(mktemp)"
awk "/<!-- CONTRIBUTORS -->/{ p=1; print; printf \"${contributors}\n\"}/<!-- END -->/{ 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