Skip to content

Instantly share code, notes, and snippets.

@geekman
Created October 19, 2011 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geekman/1297609 to your computer and use it in GitHub Desktop.
Save geekman/1297609 to your computer and use it in GitHub Desktop.
runs lsbom from .pkg without leaving temp files lying around
#!/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