]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - update-cvarcount.sh
Merge remote-tracking branch 'origin/samual/hud_notify_fontsize'
[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                 echo "Please wait for 30 seconds, so you have had enough time to read this..."
18                 sleep 30
19         fi
20 done