summaryrefslogtreecommitdiffstats
path: root/Utilities/Scripts/pragma-once.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/Scripts/pragma-once.sh')
-rwxr-xr-xUtilities/Scripts/pragma-once.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/Utilities/Scripts/pragma-once.sh b/Utilities/Scripts/pragma-once.sh
new file mode 100755
index 0000000..bb6e1a0
--- /dev/null
+++ b/Utilities/Scripts/pragma-once.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+files=$(git ls-files \
+ 'Source/*.h' \
+ 'Source/*.h.in' \
+ 'Source/*.hxx' \
+ 'Utilities/cm3p/*.h' \
+ 'Utilities/cmThirdParty.h.in' \
+ 'Utilities/std/cm' \
+ 'Utilities/std/cmext' \
+ 'Utilities/std/cmSTL.hxx.in' \
+ | grep -v '^Source/CPack/cmCPackConfigure\.h\.in$' \
+ | grep -v '^Source/cmCPluginAPI\.h$' \
+ | grep -v '^Source/cmVersionConfig\.h\.in$' \
+ | grep -v '^Source/CursesDialog/form/' \
+ | grep -v '^Source/LexerParser/' \
+ | grep -v '^Source/kwsys/' \
+ | grep -v '\.cxx$' \
+)
+
+perl -i Utilities/Scripts/pragma-once.pl $files