Last change
on this file since 77578e8 was e49d0ac, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago |
Update files with /bin/sh shebang
|
-
Property mode
set to
100755
|
File size:
904 bytes
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # SPDX-FileCopyrightText: 2018 Jiri Svoboda
|
---|
4 | #
|
---|
5 | # SPDX-License-Identifier: BSD-3-Clause
|
---|
6 | #
|
---|
7 |
|
---|
8 | ccheck=tools/sycek/ccheck
|
---|
9 | if [ ."$CCHECK" != . ]; then
|
---|
10 | ccheck="$CCHECK"
|
---|
11 | fi
|
---|
12 |
|
---|
13 | if [ ."$1" = .--fix ]; then
|
---|
14 | opt=--fix
|
---|
15 | else
|
---|
16 | opt=
|
---|
17 | fi
|
---|
18 |
|
---|
19 | srepcnt=0
|
---|
20 | snorepcnt=0
|
---|
21 | fcnt=0
|
---|
22 |
|
---|
23 | find abi kernel boot uspace -type f -regex '^.*\.[ch]$' \
|
---|
24 | | grep -v -e '^uspace/lib/pcut/' \
|
---|
25 | | (
|
---|
26 | while read fname; do
|
---|
27 | outfile="$(mktemp)"
|
---|
28 | "$ccheck" $opt $fname >"$outfile" 2>&1
|
---|
29 | if [ $? -eq 0 ]; then
|
---|
30 | if [ -s "$outfile" ] ; then
|
---|
31 | srepcnt=$((srepcnt + 1))
|
---|
32 | cat "$outfile"
|
---|
33 | else
|
---|
34 | snorepcnt=$((snorepcnt + 1))
|
---|
35 | fi
|
---|
36 | else
|
---|
37 | fcnt=$((fcnt + 1))
|
---|
38 | cat "$outfile"
|
---|
39 | fi
|
---|
40 |
|
---|
41 | rm -f "$outfile"
|
---|
42 | done
|
---|
43 |
|
---|
44 | if [ $srepcnt -eq 0 ] && [ $fcnt -eq 0 ]; then
|
---|
45 | echo "Ccheck passed."
|
---|
46 | else
|
---|
47 | echo "Ccheck failed."
|
---|
48 | echo "Checked files with issues: $srepcnt"
|
---|
49 | echo "Checked files without issues: $snorepcnt"
|
---|
50 | echo "Files with parse errors: $fcnt"
|
---|
51 | exit 1
|
---|
52 | fi
|
---|
53 | )
|
---|
Note:
See
TracBrowser
for help on using the repository browser.