summaryrefslogtreecommitdiff
path: root/coccinelle/run-coccinelle.sh
diff options
context:
space:
mode:
Diffstat (limited to 'coccinelle/run-coccinelle.sh')
-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 ..."