mirror of
https://github.com/systemd/systemd
synced 2024-07-22 18:55:10 +00:00
31d31f2021
Also, allow run-cocinnelle.sh to be started from any directory. Unfortunately set -x does not work nicely anymore, because the list is too verbose. Replace it by an echo line.
13 lines
360 B
Bash
Executable file
13 lines
360 B
Bash
Executable file
#!/bin/bash -e
|
|
|
|
files="$(git ls-files ':/*.[ch]')"
|
|
|
|
for SCRIPT in ${@-coccinelle/*.cocci} ; do
|
|
echo "--x-- Processing $SCRIPT --x--"
|
|
TMPFILE=`mktemp`
|
|
echo "+ spatch --sp-file $SCRIPT ..."
|
|
spatch --sp-file $SCRIPT $files 2>"$TMPFILE" || cat "$TMPFILE"
|
|
rm "$TMPFILE"
|
|
echo -e "--x-- Processed $SCRIPT --x--\n"
|
|
done
|