diff options
Diffstat (limited to 'trunk/src/ego')
-rw-r--r-- | trunk/src/ego/AUTHOR | 1 | ||||
-rw-r--r-- | trunk/src/ego/AUTHORS | 1 | ||||
-rw-r--r-- | trunk/src/ego/ChangeLog | 2 | ||||
-rw-r--r-- | trunk/src/ego/Makefile | 18 | ||||
-rw-r--r-- | trunk/src/ego/README | 2 | ||||
-rw-r--r-- | trunk/src/ego/TODO | 0 | ||||
-rw-r--r-- | trunk/src/ego/ego | 86 |
7 files changed, 0 insertions, 110 deletions
diff --git a/trunk/src/ego/AUTHOR b/trunk/src/ego/AUTHOR deleted file mode 100644 index 36d5bfd..0000000 --- a/trunk/src/ego/AUTHOR +++ /dev/null @@ -1 +0,0 @@ -Aron Griffis <agriffis@gentoo.org> diff --git a/trunk/src/ego/AUTHORS b/trunk/src/ego/AUTHORS deleted file mode 100644 index 36d5bfd..0000000 --- a/trunk/src/ego/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Aron Griffis <agriffis@gentoo.org> diff --git a/trunk/src/ego/ChangeLog b/trunk/src/ego/ChangeLog deleted file mode 100644 index 503d0da..0000000 --- a/trunk/src/ego/ChangeLog +++ /dev/null @@ -1,2 +0,0 @@ -2004-15-01 Karl Trygve Kalleberg <karltk@gentoo.org> - * Added Makefile diff --git a/trunk/src/ego/Makefile b/trunk/src/ego/Makefile deleted file mode 100644 index b27a2cb..0000000 --- a/trunk/src/ego/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2004 Karl Trygve Kalleberg <karltk@gentoo.org> -# Copyright 2004 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License v2 -# -# $Header$ - -include ../../makedefs.mak - -all: - -dist: - mkdir -p ../../$(distdir)/src/ego/ - cp Makefile AUTHORS README TODO ChangeLog ego ../../$(distdir)/src/ego/ - -install: all - install -d $(docdir)/ego - install -m 0644 AUTHORS README ego $(docdir)/ego/ - diff --git a/trunk/src/ego/README b/trunk/src/ego/README deleted file mode 100644 index 6c44b4c..0000000 --- a/trunk/src/ego/README +++ /dev/null @@ -1,2 +0,0 @@ -[ -f ${HOME}/scripts/ego.bash ] && -alias ego="unalias ego ; source ${HOME}/scripts/ego.bash ; ego " diff --git a/trunk/src/ego/TODO b/trunk/src/ego/TODO deleted file mode 100644 index e69de29..0000000 --- a/trunk/src/ego/TODO +++ /dev/null diff --git a/trunk/src/ego/ego b/trunk/src/ego/ego deleted file mode 100644 index f1691f2..0000000 --- a/trunk/src/ego/ego +++ /dev/null @@ -1,86 +0,0 @@ -echo1() { - echo "$1" -} - -ego() { - local portdir tmpdir category pkg target - - # This is WAY faster than portageq: - # portdir=$(portageq portdir) - # tmpdir=$(portageq envvar PORTAGE_TMPDIR)/portage - eval $( - . /etc/make.globals - . /etc/make.conf - export PORTDIR PORTAGE_TMPDIR - export | sed -n ' - s/^declare -x PORTDIR=/portdir=/p - s/^declare -x PORTAGE_TMPDIR=\(.*\)/tmpdir=\1\/portage/p' - ) - - case $1 in - *-*/*) - pkg=${1##*/} - category=${1%/*} - ;; - - ?*) - pkg=$1 - # require an ebuild so that we can block deprecated packages - # such as dev-libs/rep-gtk - category=$(echo1 $portdir/*-*/$pkg/*.ebuild) - [[ -f $category ]] || category=$(echo1 $portdir/*-*/$pkg*/*.ebuild) - [[ -f $category ]] || category=$(echo1 $portdir/*-*/*$pkg/*.ebuild) - [[ -f $category ]] || category=$(echo1 $portdir/*-*/*$pkg*/*.ebuild) - if [[ ! -f $category ]]; then - echo "Can't find $pkg in $portdir" >&2 - return 1 - fi - pkg=${category%/*} - pkg=${pkg##*/} - category=${category#$portdir/} - category=${category%%/*} - ;; - - *) - # Check if we're under $portdir first - pkg=${PWD##*/} - category=${PWD%/*} - category=${category##*/} - if [[ ! -d $portdir/$category/$pkg ]]; then - # Next check if we're in PORTAGE_TMPDIR - if [[ $PWD = $tmpdir/* ]]; then - pkg=${PWD#$tmpdir/} - pkg=${pkg%%/*} - pkg=${pkg%%-[0-9]*} # not really a valid assumption - category=$(echo1 $portdir/*-*/$pkg/*.ebuild) - if [[ ! -f $category ]]; then - echo "Can't find $pkg in $portdir" >&2 - return 1 - fi - category=${category#$portdir/} - category=${category%%/*} - else - echo "syntax: ego [pkgname]" >&2 - echo "or simply ego from a dir under $portdir or $tmpdir" >&2 - return 1 - fi - fi - ;; - esac - - # go to tmpdir or portdir? - if [[ $PWD/ = */$category/$pkg/* ]]; then - [[ -n $tmpdir ]] || tmpdir=$(portageq envvar PORTAGE_TMPDIR)/portage - target=$(command ls -1td $tmpdir/$pkg-* 2>/dev/null | head -n 1) - if [[ -z $target ]]; then - echo "No matches found for $tmpdir/$pkg-*" >&2 - return 1 - fi - cd $target/work/$pkg* 2>/dev/null || - cd $target/work 2>/dev/null || - cd $target - else - cd $portdir/$category/$pkg - fi -} - |