summaryrefslogtreecommitdiff
path: root/coccinelle
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-06-07 15:07:14 +0200
committerLennart Poettering <lennart@poettering.net>2018-06-07 16:22:16 +0200
commit12b74c38e2785a9e9503894e585722900882a056 (patch)
tree36b643166c2be9c57a19157b3e955010693e85b9 /coccinelle
parentb47837ac412ca9871a1dafa68ad7d77e5e0a76d7 (diff)
downloadsystemd-12b74c38e2785a9e9503894e585722900882a056.tar.gz
tools: make various scripts find the top-levle git dir automatically
Diffstat (limited to 'coccinelle')
-rwxr-xr-xcoccinelle/run-coccinelle.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/coccinelle/run-coccinelle.sh b/coccinelle/run-coccinelle.sh
index 4c8c08227b..a18da58a3e 100755
--- a/coccinelle/run-coccinelle.sh
+++ b/coccinelle/run-coccinelle.sh
@@ -1,5 +1,6 @@
#!/bin/bash -e
+top="$(git rev-parse --show-toplevel)"
files="$(git ls-files ':/*.[ch]')"
args=
@@ -10,7 +11,7 @@ case "$1" in
;;
esac
-for SCRIPT in ${@-coccinelle/*.cocci} ; do
+for SCRIPT in ${@-$top/coccinelle/*.cocci} ; do
echo "--x-- Processing $SCRIPT --x--"
TMPFILE=`mktemp`
echo "+ spatch --sp-file $SCRIPT $args ..."