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

Re: dependencies



*- On 20 Apr, Branden Robinson wrote about "Re: dependencies"
> On Tue, Apr 20, 1999 at 10:00:58AM -0500, Brian Servis wrote:
>> #!/bin/sh
>> # findlibpkg:  Find the libs that a executable depends on and what 
>> #              package they are in.
>> #
>> # usage:   findlibpkg <full path of executable>
>> 
>> LIST=`ldd $1 | cut -d" " -f3`
>> for i in $LIST ; do
>>     zgrep "`echo $i | sed -e 's/^\///'` " /var/lib/dpkg/Contents.gz
>> done
>> 
>> #end findlibpkg
> 
> <nitpick mode>
> 
> Every time I see sed expressions like that I shake my head.
> 

ok.  Like I said, it was a hack.  It works but may not be perfect.

How about:

LIST=`ldd $1 | cut -d" " -f3`
for i in $LIST ; do
    zgrep "`echo $i | sed 's|^/||'` " /var/lib/dpkg/Contents-i386.gz
done

Thanks for the critique.

-- 
Brian 

ps. how are your fvwm radiation burns doing?



Reply to: