]> granicus.if.org Git - php/commitdiff
Make credits script executable from other paths
authorPeter Kokot <peterkokot@gmail.com>
Sat, 16 Mar 2019 00:37:34 +0000 (01:37 +0100)
committerPeter Kokot <peterkokot@gmail.com>
Sat, 16 Mar 2019 00:37:34 +0000 (01:37 +0100)
scripts/dev/credits

index bdeb2bce07e9b5d99487f2683d8957003fd6bab2..5197b7bc19ce0bf10800ac7e715f2aa5774ff2d6 100755 (executable)
@@ -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"\");" }'