* [gentoo-dev] my simple dependancy generator
@ 2002-08-21 8:32 Paul
2002-08-21 12:21 ` pof
0 siblings, 1 reply; 2+ messages in thread
From: Paul @ 2002-08-21 8:32 UTC (permalink / raw
To: gentoo-dev
Hi;
Not running gnome or kde, I prefer to be as tight as
possible on dependancies.
I whiped up this scrawny script to help me determine the
dependancies for some ebuilds I write; does anyone want to
improve it, or say why it sucks?
---
[squish.home.loc] /home/set/mysrc/script (Set): cat pkg-depend
#!/bin/sh
FILE=$1
if [ ! -f "$FILE" ] ; then
FILE=`which $1`
fi
ldd "$FILE" | gawk '{ print $3 }' - | xargs -n1 qpkg -nc -f -v\
| sort | uniq
---
Paul
set@pobox.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] my simple dependancy generator
2002-08-21 8:32 [gentoo-dev] my simple dependancy generator Paul
@ 2002-08-21 12:21 ` pof
0 siblings, 0 replies; 2+ messages in thread
From: pof @ 2002-08-21 12:21 UTC (permalink / raw
To: gentoo-dev; +Cc: Paul
[-- Attachment #1: Type: text/plain, Size: 1324 bytes --]
On Wed, 21 Aug 2002 04:32:06 -0400
Paul <set@pobox.com> wrote:
> Hi;
>
> Not running gnome or kde, I prefer to be as tight as
> possible on dependancies.
> I whiped up this scrawny script to help me determine the
> dependancies for some ebuilds I write; does anyone want to
> improve it, or say why it sucks?
>
> ---
> [squish.home.loc] /home/set/mysrc/script (Set): cat pkg-depend
> #!/bin/sh
>
> FILE=$1
> if [ ! -f "$FILE" ] ; then
> FILE=`which $1`
> fi
>
> ldd "$FILE" | gawk '{ print $3 }' - | xargs -n1 qpkg -nc -f -v\
> | sort | uniq
> ---
>
> Paul
> set@pobox.com
It works well for me, made simple changes to look nicer:
------8<---- cut here ---------
#!/bin/sh
if [ ${#} != 1 ]; then
echo "usage: `basename ${0}` binary"
exit 1
fi
FILE=`which ${1} 2>/dev/null`
if [ ${?} != 0 ]; then
echo "Error: file not found"
exit 2
fi
echo -e "\x1b[0;01mChecking \x1b[32;01m${FILE} \x1b[0;01mdependancies..."
echo
ldd "${FILE}" | gawk '{ print $3 }' - | xargs -n1 qpkg -f -v | sort | uniq
------8<---- cut here ---------
Regards,
Pau.
--
.----------------------------------------------.
| Pau Oliva Fora http://pof.eslack.org |
| KeyID: 665D05B533539E02 available at keyserv |
`----------------------------------------------'
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-21 12:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-21 8:32 [gentoo-dev] my simple dependancy generator Paul
2002-08-21 12:21 ` pof
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox