Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
99dc3a33
Unverified
Commit
99dc3a33
authored
Feb 08, 2019
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coccinelle: add coccinelle support
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
f57860ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
run-coccinelle.sh
coccinelle/run-coccinelle.sh
+27
-0
No files found.
coccinelle/run-coccinelle.sh
0 → 100755
View file @
99dc3a33
#!/bin/bash -e
top
=
"
$(
git rev-parse
--show-toplevel
)
"
files
=
"
$(
git ls-files
':/*.[ch]'
)
"
args
=
case
"
$1
"
in
-i
)
args
=
"
$args
--in-place"
shift
;;
esac
if
!
parallel
-h
>
/dev/null
;
then
echo
'Please install GNU parallel (package "parallel")'
exit
1
fi
for
SCRIPT
in
${
@-
$top
/coccinelle/*.cocci
}
;
do
echo
"--x-- Processing
$SCRIPT
--x--"
TMPFILE
=
`
mktemp
`
echo
"+ spatch --sp-file
$SCRIPT
$args
..."
parallel
--halt
now,fail
=
1
--keep-order
--noswap
--max-args
=
20
\
spatch
--sp-file
$SCRIPT
$args
:::
$files
\
2>
"
$TMPFILE
"
||
cat
"
$TMPFILE
"
echo
-e
"--x-- Processed
$SCRIPT
--x--
\n
"
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment