printf '%s@gentoo.org ' ${ret//\~}
echo
}
+eget_maintainer() {
+ local f=${1:-metadata.xml}
+ local maintainer=$(xml sel -t -v pkgmetadata/herd $f)
+ if [[ ${maintainer:-no-herd} == "no-herd" ]] ; then
+ maintainer=$(xml sel -t -v pkgmetadata/maintainer/email $f)
+ elif [[ -n ${maintainer} ]] ; then
+ maintainer="${maintainer}@gentoo.org"
+ fi
+ if [[ -z ${maintainer} ]] ; then
+ echo "No maintainer found in $f"
+ return 1
+ fi
+ echo "${maintainer}"
+ return 0
+}
submit_bug_stable() {
local msg="doit"
if [[ $1 == "-m" ]] ; then
echo "Usage: submit_bug_stable <ebuilds>"
return 1
fi
- local maintainer=$(xml sel -t -v pkgmetadata/herd metadata.xml)
- if [[ ${maintainer} == "no-herd" ]] ; then
- maintainer=$(xml sel -t -v pkgmetadata/maintainer/email metadata.xml)
- elif [[ -n ${maintainer} ]] ; then
- maintainer="${maintainer}@gentoo.org"
- fi
- if [[ -z ${maintainer} ]] ; then
- echo "No maintainer found in metadata.xml"
- return 1
- fi
+ local maintainer
+ maintainer=$(eget_maintainer) || return 1
local cat=$(basename $(dirname $(pwd)))
local pkg=${1%.ebuild}
local ebuild=${pkg}.ebuild