]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/tools/whitespace.sh
Merge branch 'master' into Mario/hagar_notfixed
[xonotic/xonotic-data.pk3dir.git] / qcsrc / tools / whitespace.sh
1 #!/bin/bash
2 set -eu
3 cd "$(dirname "$0")"
4 cd ..
5
6 function check() {
7     declare -l base="${1}"
8     find "$base" -type f -print0 | sort -z | xargs -0 sed -i \
9         `# strip trailing spaces`                            \
10         -e 's/[[:space:]]*$//'                               \
11         `# line feed at EOF for #include to work properly`   \
12         -e '$a\'
13 }
14
15 check lib
16 check common
17 check client
18 check server
19 check menu