com php-src: Make credits script executable from other paths: scripts/dev/credits
| From: | Peter Kokot | Date: | Sat, 16 Mar 2019 00:37:34 +0000 |
| Subject: | com php-src: Make credits script executable from other paths: scripts/dev/credits | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-105160@lists.php.net to get a copy of this message | ||
Commit: 78596973b3f7af2b8514e015d3e60ec717c586de
Author: Peter Kokot <peterkokot@gmail.com> Sat, 16 Mar 2019 01:37:34 +0100
Parents: cf8a4b03dce20619df17236d4ae39728b4dba2c2
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=78596973b3f7af2b8514e015d3e60ec717c586de
Log:
Make credits script executable from other paths
Changed paths:
M scripts/dev/credits
Diff:
diff --git a/scripts/dev/credits b/scripts/dev/credits
index bdeb2bc..5197b7b 100755
--- a/scripts/dev/credits
+++ b/scripts/dev/credits
@@ -1,4 +1,10 @@
#!/bin/sh
+#
+# Generate credits_*.h headers from the ext/*/CREDITS and sapi/*/CREDITS files.
+
+# Go to project root directory
+cd $(CDPATH= cd -- "$(dirname -- "$0")/../../" && pwd -P)
+
awkprog='
BEGIN { FS = "\n|\r\n|\r"; RS = "" }
{ print "CREDIT_LINE(\""$1"\", \""$2"\");"
}'