Skip to content

Commit 669c04a

Browse files
author
Paul Dreik
committed
auto format shell scripts
1 parent f98278d commit 669c04a

21 files changed

+697
-744
lines changed

bootstrap.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ set -e
1111
me="$(basename "$0")"
1212

1313
for prog in aclocal autoheader automake autoconf make; do
14-
if ! which $prog >/dev/null 2>&1 ; then
15-
echo "$me: please install $prog"
16-
exit 1
17-
fi
14+
if ! which $prog >/dev/null 2>&1; then
15+
echo "$me: please install $prog"
16+
exit 1
17+
fi
1818
done
1919

2020
aclocal --warnings=all

cppcheck/run_cppcheck.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@ cppcheck $args --xml ./*.cc ./*.hh 2>"$outdir/cppcheck.xml"
1818

1919
cppcheck-htmlreport --source-dir=. --title=rdfind --file="$outdir/cppcheck.xml" --report-dir="$outdir"
2020

21-
2221
#is anything serious found?
2322
if grep --quiet -v -E '^(style|information|performance):' "$outdir/cppcheck.out"; then
24-
echo "$me: cppcheck found serious issues. see $outdir/cppcheck.out"
25-
exit 1
23+
echo "$me: cppcheck found serious issues. see $outdir/cppcheck.out"
24+
exit 1
2625
fi
2726

2827
echo "$me: cppcheck passed without serious issues."
29-
30-

do_clang_format.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
# See LICENSE for further details.
99

1010
#find clang format (usually named clang-format-3.x or clang-format, who knows)
11-
CLANGFORMAT="$(find /usr/local/bin /usr/bin -executable -name "clang-format*" |grep -v -- -diff |sort -g |tail -n1)"
11+
CLANGFORMAT="$(find /usr/local/bin /usr/bin -executable -name "clang-format*" | grep -v -- -diff | sort -g | tail -n1)"
1212

13-
if [ ! -x "$CLANGFORMAT" ] ; then
14-
echo "failed finding clangformat"
15-
exit 1
13+
if [ ! -x "$CLANGFORMAT" ]; then
14+
echo "failed finding clangformat"
15+
exit 1
1616
else
17-
echo "found clang format: $CLANGFORMAT"
17+
echo "found clang format: $CLANGFORMAT"
1818
fi
1919

20-
find . -maxdepth 1 -type f \( -name "*.h" -o -name "*.cpp" -o -name "*.cc" -o -name "*.hh" \) -print0 | \
21-
xargs -0 -n1 "$CLANGFORMAT" -i
20+
find . -maxdepth 1 -type f \( -name "*.h" -o -name "*.cpp" -o -name "*.cc" -o -name "*.hh" \) -print0 \
21+
| xargs -0 -n1 "$CLANGFORMAT" -i

0 commit comments

Comments
 (0)