Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'alternative using lsbom' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
alternative using lsbom
Authored by: hayne on May 01, '03 11:33:05AM

An alternative way is to look at the "bill of materials" contained
in the ".bom" file. (Thanks to the forums' "mervTormel" for the
idea.) Here's a script that does that (I made it executable and
saved it as 'lspkg' in my ~/bin folder):

#!/bin/sh

# This script lists the "bill of materials"
# for the pkg file specified as a command-line argument.

if [ $# -lt 1 ]; then
scriptname=`basename $0`
echo "Usage: $scriptname pkg_file"
exit
fi

pkg_path=$1
bom_files=`find $pkg_path -name '*.bom' -print`
for bom_file in $bom_files
do
lsbom $bom_file
done



[ Reply to This | # ]
path-handling
Authored by: Krioni on May 01, '03 02:28:42PM

Hmm. lspkg does not work with paths that are escaped to work
in the shell, and doesn't seem to allow you to quote a file, either.
Spaces always break it. Anyone got a fix?



[ Reply to This | # ]
path-handling
Authored by: mervTormel on May 01, '03 02:31:42PM

double-quote all the $var references, i.e.,

"$pkg_file"



[ Reply to This | # ]