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

loc=$(dirname "$0")

for b in "$@"; do
    comment="Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:

apport-collect $b

This will help us to find and resolve the problem. Bear in mind that you may need to install the python-launchpadlib package from the universe repository.  Additionally, when prompted to give apport-collect permissions for Launchpad you will need to give it at least the ability to \"Change Non-Private\" data as it will be adding information to your bug report.  Thanks in advance!
"
    "$loc"/update-bug --status "Incomplete" --comment "$comment" $b || {
        echo "ERROR with LP: #$b" >&2
    }
done

