summaryrefslogtreecommitdiff
path: root/pre-commit.sh
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-09-12 15:40:56 -0400
committerpommicket <pommicket@gmail.com>2025-09-12 15:41:24 -0400
commitca21dcb53e41919fc255ad736986aa6ff1d5bd85 (patch)
tree08b0a41be6dacdbd9d1cc22e4931d150ef78e2ce /pre-commit.sh
parent802f11352a1f8ab25a222111d2ba254ed9f7113f (diff)
Implement sections
Diffstat (limited to 'pre-commit.sh')
-rwxr-xr-xpre-commit.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/pre-commit.sh b/pre-commit.sh
index 2c213bd..6841365 100755
--- a/pre-commit.sh
+++ b/pre-commit.sh
@@ -1,6 +1,11 @@
#!/bin/sh
if sed --version | grep -q 'GNU sed'; then
- # Remove trailing white space
- sed -i 's/\s\s*$//' pom.c pom.h
+ for file in pom.c pom.h; do
+ # Remove trailing white space
+ # (But only if file actually has trailing white space
+ # we don't want to mess up last-modified-times otherwise)
+ grep -q '\s\s*$' $file && sed -i 's/\s\s*$//' $file
+ done
fi
+which doxygen >/dev/null 2>/dev/null && { doxygen || exit 1; }
git add -u