#!/usr/bin/env bash
# Script to ensure that platforms/Cross/vm/sqSCCSVersion.h has been updated
# We would like to run updateSCCSVersions automatically but this requires
# git to be up-to-date, seems not to work on Cygin, etc.  Instead simply print
# an error message and answer success. This script can be used in mvm

PWD="`dirname $0`"
VERSION_FILE="platforms/Cross/vm/sqSCCSVersion.h"
if fgrep '$Rev$' "$PWD/../$VERSION_FILE" ; then
	echo "$VERSION_FILE not up-to-date." 1>&2
	echo "You must run $PWD/updateSCCSVersions" 1>&2
	exit 0 # i.e. so that we can say if checkSCCSVersion; then exit 1; fi
fi
exit 1
