react-native-vision-camera/package/scripts/clang-format.sh
2024-02-20 20:34:34 +01:00

11 lines
434 B
Bash
Executable File

#!/bin/bash
if which clang-format >/dev/null; then
find cpp ios android/src/main/cpp -type f \( -name "*.h" -o -name "*.cpp" -o -name "*.m" -o -name "*.mm" \) -print0 | while read -d $'\0' file; do
clang-format -style=file:./cpp/.clang-format -i "$file"
done
else
echo "error: clang-format not installed, install with 'brew install clang-format' (or manually from https://clang.llvm.org/docs/ClangFormat.html)"
exit 1
fi