Initial commit

This commit is contained in:
2026-01-27 17:13:49 +01:00
commit a82ec43e74
76 changed files with 4584 additions and 0 deletions

31
format.sh Normal file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
# Variable that will hold the name of the clang-format command
FMT="clang-format"
# Function to format files
format() {
for f in $(find "$1" \( -name '*.h' -or -name '*.m' -or -name '*.mm' -or -name '*.c' -or -name '*.cpp' \)); do
# Skip *_generated.h files
if [[ "$f" == *_generated.h ]]; then
continue
fi
echo "format ${f}"
${FMT} -i "${f}"
done
echo "~~~ $1 Done ~~~"
}
# Check if argument is provided
if [ -z "$1" ]; then
echo "Please provide a directory as an argument."
exit 1
fi
# Check if directory exists
if [ ! -d "$1" ]; then
echo "$1 is not a valid directory."
exit 1
fi
format "$1"