1
0
This repository has been archived on 2024-07-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-07-22 01:58:46 -03:00

15 lines
484 B
Bash
Executable File

#!/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