mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-13 04:22:58 +02:00
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:
@@ -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
11
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 \
|
||||
"/<!-- 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
|
||||
|
||||
Reference in New Issue
Block a user