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