Differences between revisions 2 and 3
Revision 2 as of 2009-03-16 03:32:33
Size: 701
Editor: anonymous
Comment: converted to 1.6 markup
Revision 3 as of 2009-03-26 06:11:11
Size: 708
Editor: PaulWise
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
{{{ {{{#!plain

The following script will list the names of every package in the pool directory of your local mirror (on your hard drive).

    #!/bin/sh
    function print_usage {
            echo gen-task-dfdsarge pool-directory
    }
    if [ -z "$1" ] ; then
            print_usage
            exit
    fi
    POOLDIR=$1
    TMPFILE=`/bin/tempfile`
    if [ `expr substr $POOLDIR 1 1` != \/ ]; then
            POOLDIR=`pwd`/$POOLDIR
    fi
    IFS=$'\n'
    for package in `find $POOLDIR -type f`; do
            pkgfilename=`basename $package`
            pkgname=`echo $pkgfilename||cut -f1 -d_`
            echo $pkgname>>$TMPFILE
    done
            cat $TMPFILE || sort -u