[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: autoup.sh & considerations on bail-out scripts



On Wed, 18 Feb 1998, Santiago Vila wrote:

> What's wrong with
> 
> (cd /var/lib/dpkg/info; ls *.list) | sed -e '/\.list/s///'  ?

doh!

yes, that will work. you'll have to check for empty .list files though.
removed packages leave them in /var/lib/dpkg/info

    pushd /var/lib/dpkg/info/

    files=$(ls -1 *.list | 
            grep -v "dpkg-dev" |
            grep -- "-dev\|-dbg\|-pic")

    INSTALLED=""
    for i in $files ; do
        [ -s $i ] && INSTALLED="$i $INSTALLED"
    done

    INSTALLED=$(echo "$INSTALLED" | sed -e 's/\.list//g')

    popd


the grep string may need more work, but that's a good start.

craig

--
craig sanders


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: