#!/bin/sh

set -eux

wget --mirror http://supercheckpartial.com/MASTER.SCP

VERSION="$(grep 'Release' supercheckpartial.com/MASTER.SCP | cut -d ' ' -f 3 | tr -d '
')"
OLDVERSION=$(cat supercheckpartial.release)
if [ "$VERSION" != "$OLDVERSION" ]; then
  dch "Update supercheckpartial MASTER.SCP to version $VERSION."
  echo "$VERSION" > supercheckpartial.release
fi
