mirror of
https://github.com/diamante0018/MW3ServerFreezer.git
synced 2025-06-29 07:41:51 +00:00
chore: update some other stuff
This commit is contained in:
14
scripts/format.sh
Normal file
14
scripts/format.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Navigate to the repository root
|
||||
cd "$(dirname "$0")/.." || exit 2
|
||||
|
||||
# Set the clang-format binary (defaults to 'clang-format')
|
||||
CLANG_FORMAT_BIN="${CLANG_FORMAT_BIN:-clang-format}"
|
||||
|
||||
# Find and format all .hpp and .cpp files in the src directory
|
||||
find ./src \( -iname '*.hpp' -o -iname '*.cpp' \) -print0 |
|
||||
xargs -0 "$CLANG_FORMAT_BIN" -i || {
|
||||
echo "Error: clang-format failed." >&2
|
||||
exit 1
|
||||
}
|
Reference in New Issue
Block a user