diff options
| author | fuzzyray <fuzzyray@gentoo.org> | 2009-05-05 17:39:24 +0000 |
|---|---|---|
| committer | fuzzyray <fuzzyray@gentoo.org> | 2009-05-05 17:39:24 +0000 |
| commit | c819d146be6bce86d97019494173253e71b85d2f (patch) | |
| tree | 200d00c2b9a420540ff9c4e0d8b3080b762fb562 /trunk/src/distfiles-clean | |
| parent | 61823fe68081c6f8edf24455bbb34123598c5bb4 (diff) | |
| download | gentoolkit-c819d146be6bce86d97019494173253e71b85d2f.tar.gz | |
Rearrange trunk to support gentoolkit version 0.3. Split into gentoolkit, gentoolkit-dev, and deprecated. Import djanderson's work on the gentoolkit library and equery
svn path=/trunk/gentoolkit/; revision=589
Diffstat (limited to 'trunk/src/distfiles-clean')
| -rw-r--r-- | trunk/src/distfiles-clean/AUTHORS | 6 | ||||
| -rw-r--r-- | trunk/src/distfiles-clean/ChangeLog | 2 | ||||
| -rw-r--r-- | trunk/src/distfiles-clean/TODO | 0 | ||||
| -rw-r--r-- | trunk/src/distfiles-clean/distfiles-clean | 78 |
4 files changed, 0 insertions, 86 deletions
diff --git a/trunk/src/distfiles-clean/AUTHORS b/trunk/src/distfiles-clean/AUTHORS deleted file mode 100644 index d913891..0000000 --- a/trunk/src/distfiles-clean/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -José Fonseca <j_r_fonseca@yahoo.co.uk> - * Wrote the script - -Karl Trygve Kalleberg <karltk@gentoo.org> - * Wrote the man page. - diff --git a/trunk/src/distfiles-clean/ChangeLog b/trunk/src/distfiles-clean/ChangeLog deleted file mode 100644 index dfe6aa8..0000000 --- a/trunk/src/distfiles-clean/ChangeLog +++ /dev/null @@ -1,2 +0,0 @@ -2002-15-11: Karl Trygve Kalleberg <karltk@gentoo.org> - * Imported newest contributions from #10647. diff --git a/trunk/src/distfiles-clean/TODO b/trunk/src/distfiles-clean/TODO deleted file mode 100644 index e69de29..0000000 --- a/trunk/src/distfiles-clean/TODO +++ /dev/null diff --git a/trunk/src/distfiles-clean/distfiles-clean b/trunk/src/distfiles-clean/distfiles-clean deleted file mode 100644 index 23af32b..0000000 --- a/trunk/src/distfiles-clean/distfiles-clean +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh -# -# distfiles-clean -# -# Cleans unused files from Portage's distfiles directory. -# -# José Fonseca <j_r_fonseca@yahoo.co.uk> - -PROGRAM=`basename "$0"` - -while [ ${#} -gt 0 ] -do - case "$1" in - -h|--help) - USAGE=y - break - ;; - -i|--ignore) - IGNORE="$IGNORE $2" - shift 2 - ;; - -I|--ignore-file) - IGNORE="$IGNORE `cat "$2"`" - shift 2 - ;; - -p|--pretend) - PRETEND=y - shift - ;; - *) - echo "$PROGRAM: Invalid option \'$1\'" 1>&2 - USAGE=y - break - ;; - esac -done - -# For PORTDIR and DISTDIR -. /etc/make.globals -. /etc/make.conf - -if [ "$USAGE" ] -then - echo "Usage: $PROGRAM [-h|--help] [-i|--ignore <glob>] [-I|--ignore-file <globfile>] [-p|--pretend]" - echo "Cleans unused files from $DISTDIR directory." - exit -fi - -DBDIR=/var/db/pkg -CACHEDIR=/var/cache/edb/dep - -for DIR in "$PORTDIR" "$DISTDIR" "$DBDIR" "$CACHEDIR" -do - if [ ! -d "$DIR" ] - then - echo "$PROGRAM: \'$DIR\' not found." - exit - fi -done - -TMPFILE=`mktemp /tmp/$PROGRAM.XXXXXX` - -cd "$DISTDIR" - -{ - echo "cvs-src" - [ "$IGNORE" ] && ls -1d $IGNORE - find "$DBDIR" -name '*.ebuild' | sed -n -e "s:^$DBDIR/\([^/]*\)/\([^/]*\)/\([^/]*\)\.ebuild$:$CACHEDIR/\1/\3:p" | xargs sed -s -e '4!d;/^$/d;s/[[:alnum:]]\+?\|(\|)//g;s/\<[^[:space:]]\+\/\<//g;s/^[[:space:]]\+//g;s/[[:space:]]\+$//g;s/[[:space:]]\+/\n/g' -} | sort -u > "$TMPFILE" && ls -1 | comm -23 - "$TMPFILE" | { - if [ "$PRETEND" ] - then - cat - else - xargs rm -f - fi -} - -rm "$TMPFILE" |
