From 78596973b3f7af2b8514e015d3e60ec717c586de Mon Sep 17 00:00:00 2001
From: Peter Kokot <peterkokot@gmail.com>
Date: Sat, 16 Mar 2019 01:37:34 +0100
Subject: Make credits script executable from other paths

---
 scripts/dev/credits | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'scripts')

diff --git a/scripts/dev/credits b/scripts/dev/credits
index bdeb2bce07..5197b7bc19 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"\");" }'
-- 
cgit v1.2.1