3 # Copyright 2006 David Shakaryan <omp@gentoo.org>
4 # Distributed under the terms of the GNU General Public License v2
6 # Change portage tree directory if you have it elsewhere.
9 # If an argument is present, use it as the overlay directory.
14 # Checking, displaying, etc.
15 for PACKAGE in *-*/*; do
16 if [[ -d ${PORTDIR}/${PACKAGE} ]] && [[ $(basename ${PACKAGE}) != "CVS" ]] && grep -q $(dirname ${PACKAGE}) ${PORTDIR}/profiles/categories; then
17 # Reset versions from last package checked.
20 # Find just package name excluding category.
21 PACKAGE_BASE="`basename ${PACKAGE}`"
22 # Find versions of package in portage.
23 for PORTPACK in `ls ${PORTDIR}/${PACKAGE}/*.ebuild | sed -e 's/.ebuild//'`; do
24 PORTPACK_VER="`basename ${PORTPACK} | sed s/${PACKAGE_BASE}-//`"
25 PORTPACK_VERS="${PORTPACK_VERS} ${PORTPACK_VER}"
27 # Find versions of package in overlay.
28 for OVERPACK in `ls ${PACKAGE}/*.ebuild | sed -e 's/.ebuild//'`; do
29 OVERPACK_VER="`basename ${OVERPACK} | sed s/${PACKAGE_BASE}-//`"
30 OVERPACK_VERS="${OVERPACK_VERS} ${OVERPACK_VER}"
32 # Output info with colors.
33 echo -e "\e[1;33m${PACKAGE}\e[0m"
34 echo -e " \e[1;35mPortage:\e[0m${PORTPACK_VERS}"
35 echo -e " \e[1;35mOverlay:\e[0m${OVERPACK_VERS}"