]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - update-cvarcount.sh
support ready-restart with the toggling speaker target
[xonotic/xonotic-data.pk3dir.git] / update-cvarcount.sh
1 #!/bin/sh
2
3 countw=`awk '/^seta? g_/ { print $2; }' balanceXonotic.cfg       | sort -u | tr -d '\r' | git hash-object --stdin | cut -c 1-32`
4 for b in balance*.cfg; do
5         countb=`awk '/^seta? g_/ { print $2; }' "$b"  | sort -u | tr -d '\r' | git hash-object --stdin | cut -c 1-32`
6         if [ "$countw" != "$countb" ]; then
7                 echo "Mismatch between balanceXonotic.cfg and $b. Aborting."
8                 echo "Differences are:"
9                 echo "< missing in $b"
10                 echo "> must get removed from $b"
11                 A=`mktemp || echo a.tmp`
12                 B=`mktemp || echo b.tmp`
13                 awk '/^seta? g_/ { print $2; }' balanceXonotic.cfg       | sort -u | tr -d '\r' > "$A"
14                 awk '/^seta? g_/ { print $2; }' "$b"                     | sort -u | tr -d '\r' > "$B"
15                 diff "$A" "$B" | grep '^[<>]' | sort
16                 rm -f "$A" "$B"
17                 exit 1
18         fi
19 done