#!/bin/sh

# Copyright: 2020, gregor herrmann <gregoa@debian.org>
# License: same as dh-make-perl

set -eu

die() {
    echo $@ >&2
    exit 1
}

OLD=${1:-}
NEW=${2:-}

[ -n "$OLD" -a -n "$NEW" ] || die "Usage: $0 OLD-STANDARDS-VERSION NEW-STANDARDS-VERSION"

sed -i -e "s/$OLD/$NEW/g" t/dists/*/*/control debian/control lib/DhMakePerl/Command/Packaging.pm
git commit -a -m "Update Standards-Version to $NEW" -m "for dh-make-perl itself, for created packages, and in the test suite."
