X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=build-aux%2Fcksum-schema-check;fp=build-aux%2Fcksum-schema-check;h=0fe37e4af440f030c5614e9a8990afa6a46c04a0;hb=abc67c1e71fe88d6351c59f7710a73dd2630857b;hp=0000000000000000000000000000000000000000;hpb=2db1b5d8c9b6bd8dbafa078c5ad3704dc8c3ecf1;p=cascardo%2Fovs.git diff --git a/build-aux/cksum-schema-check b/build-aux/cksum-schema-check new file mode 100755 index 000000000..0fe37e4af --- /dev/null +++ b/build-aux/cksum-schema-check @@ -0,0 +1,14 @@ +#!/bin/sh + +schema=$1 +stamp=$2 + +sum=`sed '/cksum/d' $schema | cksum` +expected=`sed -n 's/.*"cksum": "\(.*\)".*/\1/p' $schema` +if test "X$sum" = "X$expected"; then + touch $stamp +else + ln=`sed -n '/"cksum":/=' $schema` + echo >&2 "$schema:$ln: The checksum \"$sum\" was calculated from the schema file and does not match cksum field in the schema file - you should probably update the version number and the checksum in the schema file with the value listed here." + exit 1 +fi