#!/bin/sh -e
# Author: Brian Murray <brian@canonical.com>
# Copyright (C) 2009 Canonical, Ltd.
# License: GPLv3

loc=$(dirname "$0")

comment="Thank you for providing a patch for this bug report. This particular package is synchronized with Debian so it would be quite helpful if you were to forward the patch to the Debian bug tracker.  You can learn more about how to use the Debian bug tracker at https://wiki.ubuntu.com/Debian/Bugs.  After you've forwarded the bug report and patch please add a bug watch, following the procedure at http://wiki.ubuntu.com/Bugs/Watches, so we can track the progress of the upstream bug report."

for b in "$@"; do
    "$loc"/update-bug --comment "$comment" --debian-task $b || {
        echo "ERROR with LP: #'$b'" >&2
    }
done
