Commit f80be4e959a5d41688dd6e257497e2627ae2d967

Werner Lemberg 2023-01-17T18:48:54

* src/tools/update-copyright: Allow execution from other repositories. We use this for `freetype-demos`.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/tools/update-copyright b/src/tools/update-copyright
index 4a8bf9b..674823c 100755
--- a/src/tools/update-copyright
+++ b/src/tools/update-copyright
@@ -4,10 +4,10 @@
 # taking care of exceptions stored in file `no-copyright'.
 
 topdir=`git rev-parse --show-toplevel`
-toolsdir=$topdir/src/tools
+toolsdir=`dirname $0`
 
 git ls-files --full-name $topdir        \
-| sed 's|^|../../|'                     \
+| sed "s|^|$topdir/|"                   \
 | grep -vFf $toolsdir/no-copyright      \
 | xargs $toolsdir/update-copyright-year