get rid of md5sum dependency
authorRudolf Polzer <divverent@alientrap.org>
Tue, 22 Jun 2010 15:04:14 +0000 (17:04 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 22 Jun 2010 15:04:14 +0000 (17:04 +0200)
update-cvarcount.sh

index 801314a6d82121f00f33e0766e0e4dd2ef78d2a8..10bd39d94b738433bf00628933b5185f9d2f7975 100755 (executable)
@@ -1,10 +1,8 @@
 #!/bin/sh
 
-balance_cfgs="balance25.cfg balanceSamual.cfg balanceXPM.cfg"
-
-countw=`awk '/^seta? g_/ { print $2; }' balance.cfg       | sort -u | tr -d '\r' | md5sum | cut -c 1-32`
-for b in $balance_cfgs; do
-       countb=`awk '/^seta? g_/ { print $2; }' "$b"  | sort -u | tr -d '\r' | md5sum | cut -c 1-32`
+countw=`awk '/^seta? g_/ { print $2; }' balance.cfg       | sort -u | tr -d '\r' | git hash-object --stdin | cut -c 1-32`
+for b in balance*.cfg; do
+       countb=`awk '/^seta? g_/ { print $2; }' "$b"  | sort -u | tr -d '\r' | git hash-object --stdin | cut -c 1-32`
        if [ "$countw" != "$countb" ]; then
                echo "Mismatch between balance.cfg and $b. Aborting."
                exit 1