diff options
author | David Shakaryan <omp@gentoo.org> | 2006-06-16 00:23:37 +0000 |
---|---|---|
committer | David Shakaryan <omp@gentoo.org> | 2006-06-16 00:23:37 +0000 |
commit | 50604df824c8b7e5c284b4e235256c2512ef1495 (patch) | |
tree | ad6910f9b8cd774c74c4309ed6e04fe2956e7907 /scripts/portdupe | |
parent | x11-themes/gtk-engines-rezlooks - bump to 0.5 (diff) | |
download | sunrise-50604df824c8b7e5c284b4e235256c2512ef1495.tar.gz sunrise-50604df824c8b7e5c284b4e235256c2512ef1495.tar.bz2 sunrise-50604df824c8b7e5c284b4e235256c2512ef1495.zip |
scripts/portdupe - initial import
svn path=/sunrise/; revision=73
Diffstat (limited to 'scripts/portdupe')
-rwxr-xr-x | scripts/portdupe | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/scripts/portdupe b/scripts/portdupe new file mode 100755 index 000000000..35e0a5679 --- /dev/null +++ b/scripts/portdupe @@ -0,0 +1,37 @@ +#!/bin/bash +# +# Copyright 2006 David Shakaryan <d@ompty.org> +# Distributed under the terms of the GNU General Public License v2 + +# Change portage tree directory if you have it elsewhere. +PORTDIR="/usr/portage/" + +# If an argument is present, use it as the overlay directory. +if [ $1 ]; then + cd ${1} +fi + +# Checking, displaying, etc. +for PACKAGE in *-*/*; do + if [ -d ${PORTDIR}/${PACKAGE} ]; then + # Reset versions from last package checked. + PORTPACK_VERS="" + OVERPACK_VERS="" + # Find just package name excluding category. + PACKAGE_BASE="`basename ${PACKAGE}`" + # Find versions of package in portage. + for PORTPACK in `ls ${PORTDIR}/${PACKAGE}/*.ebuild | sed -e 's/.ebuild//'`; do + PORTPACK_VER="`basename ${PORTPACK} | sed s/${PACKAGE_BASE}-//`" + PORTPACK_VERS="${PORTPACK_VERS} ${PORTPACK_VER}" + done + # Find versions of package in overlay. + for OVERPACK in `ls ${PACKAGE}/*.ebuild | sed -e 's/.ebuild//'`; do + OVERPACK_VER="`basename ${OVERPACK} | sed s/${PACKAGE_BASE}-//`" + OVERPACK_VERS="${OVERPACK_VERS} ${OVERPACK_VER}" + done + # Output info with colors. + echo -e "\e[1;33m${PACKAGE}\e[0m" + echo -e " \e[1;35mPortage:\e[0m${PORTPACK_VERS}" + echo -e " \e[1;35mOverlay:\e[0m${OVERPACK_VERS}" + fi +done |