To use this, run as a user who can access /usr/local/encap. Execute with the current directory being wherever you've downloaded the foo-2.5.1-pkg.tar.gz files. It will only act on *-pkg.tar.gz files.
If you have any suggestions, requests, or patches, drop me a line: geoff@raye.com