Re: Relying on shell tools to be installed? Where do you find this out?
Re: Relying on shell tools to be installed? Where do you find this out?
- Subject: Re: Relying on shell tools to be installed? Where do you find this out?
- From: Cameron Hayne <email@hidden>
- Date: Wed, 22 Jun 2005 21:34:42 -0400
On 22-Jun-05, at 4:56 PM, Finlay Dobbie wrote:
And for a free alternative, just use lsbom on the bom files in /
Library/Receipts
Here's the shell script that I use to answer the sort of question you
asked - I named this script 'grep_pkg':
---------------------------------------
#!/bin/sh
# This script searches the bom files in /Library/receipts
# for the component name given as a command line argument
# It will show the info about that component from the bom file
# followed by the name of the pkg that contained that component
# Cameron Hayne (email@hidden), Sept 2004
name=$1
cd /Library/Receipts
for pkg in *.pkg; do
find "$pkg" -name '*.bom' -print0 | xargs -0 lsbom | grep "$name"
if [ $? = 0 ]; then
echo "$pkg"
fi
done
-----------------------------------------
--
Cameron Hayne
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden