credits 834 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. #
  3. # Generate credits_*.h headers from the ext/*/CREDITS and sapi/*/CREDITS files.
  4. # Go to project root directory
  5. cd $(CDPATH= cd -- "$(dirname -- "$0")/../../" && pwd -P)
  6. awkprog='
  7. BEGIN { FS = "\n|\r\n|\r"; RS = "" }
  8. { print "CREDIT_LINE(\""$1"\", \""$2"\");" }'
  9. for what in ext sapi
  10. do
  11. file=ext/standard/credits_$what.h
  12. cat >$file <<END
  13. /*
  14. DO NOT EDIT THIS FILE!
  15. it has been automatically created by scripts/dev/credits from
  16. the information found in the various ext/.../CREDITS and
  17. sapi/.../CREDITS files
  18. if you want to change an entry you have to edit the appropriate
  19. CREDITS file instead
  20. */
  21. END
  22. # Do not process skeleton
  23. files=`find "$what" -name CREDITS | grep -v "$what"/skeleton/CREDITS`
  24. awk "$awkprog" $files | LC_ALL=C sort -f | uniq >> $file
  25. echo "Updated $file"
  26. done