Created
October 19, 2011 06:28
-
-
Save geekman/1297609 to your computer and use it in GitHub Desktop.
runs lsbom from .pkg without leaving temp files lying around
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# runs lsbom from .pkg without leaving temp files lying around | |
PKG=$1 | |
[ ! -f "$PKG" ] && echo "usage: $0 <pkg-file> [ <lsbom-args> ... ]" && exit 1 | |
shift | |
BOM=$(pkgutil --bom "$PKG") | |
lsbom $@ "$BOM" | |
[ -f "$BOM" ] && rm "$BOM" && rmdir `dirname "$BOM"` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment