mirror of
https://github.com/orange-cpp/omath.git
synced 2026-04-18 15:23:26 +00:00
15 lines
426 B
Bash
15 lines
426 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Format all CMakeLists.txt and *.cmake files in the repo (excluding common build dirs)
|
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
|
|
cd "$REPO_ROOT"
|
|
|
|
find . \
|
|
-path "./build" -prune -o \
|
|
-path "./cmake-build-*" -prune -o \
|
|
-path "./out" -prune -o \
|
|
-path "./.git" -prune -o \
|
|
\( -name "CMakeLists.txt" -o -name "*.cmake" \) -print0 \
|
|
| xargs -0 cmake-format -i |