• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Relying on shell tools to be installed? Where do you find this out?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Relying on shell tools to be installed? Where do you find this out? (From: "Theodore H. Smith" <email@hidden>)
 >Re: Relying on shell tools to be installed? Where do you find this out? (From: Sherm Pendley <email@hidden>)
 >Re: Relying on shell tools to be installed? Where do you find this out? (From: Finlay Dobbie <email@hidden>)

  • Prev by Date: Re: Wait some seconds
  • Next by Date: Re: How to set a default row in NSTableView?
  • Previous by thread: Re: Relying on shell tools to be installed? Where do you find this out?
  • Next by thread: Re: Relying on shell tools to be installed? Where do you find this out?
  • Index(es):
    • Date
    • Thread