Commit d2ec59c5 authored by Franziskus Kiefer's avatar Franziskus Kiefer

Bug 1118245 - clang-format CI follow-up, r=ttaubert

--HG--
extra : amend_source : ec2a52c99dce754584d9a35134bdbc88414d05ce
parent f60362e1
......@@ -28,7 +28,7 @@ cd "$top"
if [ $# -gt 0 ]; then
dirs=("$@")
else
dirs=($(find . ! -path . \( ! -regex '.*/' \) -type d -maxdepth 2 -mindepth 2))
dirs=($(find . ! -path . \( ! -regex '.*/' \) -maxdepth 2 -mindepth 1 -type d))
fi
format_folder()
......@@ -44,8 +44,13 @@ format_folder()
for dir in "${dirs[@]}"; do
if format_folder "$dir" ; then
c="${dir//[^\/]}"
echo "formatting $dir ..."
find "$dir" -type f \( -name '*.[ch]' -o -name '*.cc' \) -exec clang-format -i {} \+
depth=""
if [ "${#c}" == "1" ]; then
depth="-maxdepth 1"
fi
find "$dir" $depth -type f \( -name '*.[ch]' -o -name '*.cc' \) -exec clang-format -i {} \+
fi
done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment