#! /bin/bash
-if [ "$(whoami)" == "karltk" ] ; then
+case $(whoami) in
+ karltk)
publish_path=dev.gentoo.org:public_html/projects/gentoolkit/releases
publish_public_path="http://dev.gentoo.org/~karltk/projects/gentoolkit/releases"
portdir=/home/karltk/source/oss/gentoo/gentoo-x86/
export ECHANGELOG_USER="Karl Trygve Kalleberg <karltk@gentoo.org>"
-elif [ "$(whoami)" == "port001" ] ; then
+ ;;
+
+ port001)
publish_path=dev.gentoo.org:public_html/distfiles/gentoolkit/releases
publish_public_path="http://dev.gentoo.org/~port001/distfiles/gentoolkit/releases"
portdir=/home/port001/Gentoo/gentoo-x86/
export ECHANGELOG_USER="Ian Leitch <port001@gentoo.org>"
-elif [ "$(whoami)" == "genone" ]; then
+ ;;
+
+ genone)
publish_path=dev:public_html/distfiles/
publish_public_path="http://dev.gentoo.org/~genone/distfiles/"
portdir=/home/gentoo/cvs/gentoo-x86/
export ECHANGELOG_USER="Marius Mauch <genone@gentoo.org>"
-else
+ ;;
+
+ agriffis)
+ publish_path=gentoo:public_html/dist/
+ publish_public_path="http://dev.gentoo.org/~agriffis/dist/"
+ portdir=/home/agriffis/portage/
+ ;;
+
+ *)
echo "!!! Don't know who $(whoami) is, can't release"
exit 1
-fi
-
+ ;;
+esac
function most-recent-ebuild() {
# FIXME: actually pick the most recent one
echo "* Generating new ebuild"
- local finalebuild="gentoolkit-dev-${VERSION}${RELEASE_TAG}.ebuild"
+ local ebuild="gentoolkit-dev-${VERSION}${RELEASE_TAG}.ebuild"
cd ${portdir}/app-portage/gentoolkit-dev || exit
- ebuild=$(most-recent-ebuild)
- cat ${ebuild} | sed \
- -e 's/KEYWORDS=.*/KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~ppc64 ~s390 ~ppc-macos"/' \
- -e "s|SRC_URI=.*|SRC_URI=\"${publish_public_path}/\$\{\P\}.tar.gz\"|" \
- > ${finalebuild} || exit
+ cp $(most-recent-ebuild) ${ebuild}
+ ekeyword ~all ${ebuild}
+ sed -i -e "s|SRC_URI=.*|SRC_URI=\"${publish_public_path}/\$\{\P\}.tar.gz\"|" ${ebuild}
echo "* Generating digest"
- ebuild ${finalebuild} digest || exit
- cvs add ${finalebuild} || exit
- echangelog "New upstream release."
+ ebuild ${ebuild} digest || exit
+ cvs add ${ebuild} || exit
+ echangelog "New upstream release"
echo '* Everything ready. You should:'
echo ' 1) ACCEPT_KEYWORDS="~x86" sudo emerge =gentoolkit-dev-${VERSION}${RELEASE_TAG}'
- echo ' 2) repoman ci -m "New upstraem release." from `pwd`'
+ echo ' 2) repoman ci -m "New upstream release" from `pwd`'
}