php-src/scripts/dev/credits
Christoph M. Becker 3f16a43d74 [ci skip] Remove trailing WS
Since commit 2238403 removed respective trailing WS in files generated
by this script, we remove the trailing WS in the first place, to avoid
further mundane merge conflicts.

[1] http://git.php.net/?p=php-src.git;a=commit;h=2238403892ccf87143a59814538d9f764509d9e7
2018-06-05 00:21:36 +02:00

27 lines
664 B
Bash
Executable file

#!/bin/sh
awkprog='
BEGIN { FS = "\n|\r\n|\r"; RS = "" }
{ print "CREDIT_LINE(\""$1"\", \""$2"\");" }'
for what in ext sapi
do
file=ext/standard/credits_$what.h
cat >$file <<END
/*
DO NOT EDIT THIS FILE!
it has been automaticaly created by php7/scripts/credits from
the information found in the various php7/ext/.../CREDITS and
php7/sapi/.../CREDITS files
if you want to change an entry you have to edit the appropriate
CREDITS file instead
*/
END
# Do not process skeleton #
files=`find "$what" -name CREDITS | grep -v "$what"/skeleton/CREDITS`
awk "$awkprog" $files | sort -f | uniq >> $file
echo "Updated $file"
done