]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - make.sh
make.sh: Modify update-contributors so that it will run with older version of awk
[people/pmueller/ipfire-2.x.git] / make.sh
diff --git a/make.sh b/make.sh
index 452284c16c84d712363972474a9e71c225fdfb62..02043cf69c11d68370bfbb29f3c7a711f486c585 100755 (executable)
--- 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 \
-               "/<!-- 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