#!/usr/bin/env bash
# open a browser with template for filing removal bug for pkg(s) ${*}
# (c) 2019-2024 Michał Górny <mgorny@gentoo.org>
# SPDX-License-Identifier: GPL-2.0-or-later

set -e

scriptdir=${BASH_SOURCE%/*}
pkgs=${*}
exec xdg-open "https://bugs.gentoo.org/enter_bug.cgi?product=Gentoo%20Linux&component=Current+packages&short_desc=$("${scriptdir}"/urlencode <<<"${pkgs// /, }: removal")&keywords=PMASKED&cc=treecleaner@gentoo.org&deadline=$(date --date='today + 30 day' +%Y-%m-%d)"
