andrewsmhay/rosetta — pull request #3 by dead10ck (2014-01-21 21:19:48+00:00)
Title: Code cleanup, Mac support, proper option parsing, various fixes

* Cleaned up lots of copy/pasted code. Still some more work to do as far as cleanup.
* Macs are now supported.
* Added proper option parsing. User can choose which footprints they want to do. The package name is no longer in the script invocation, since it wasn't used anywhere.
* Various fixes.
* Ubuntu/Debian do not support `chkconfig` any more. They are not even in the official repos any more, so they are not available to install through official channels. So, the command line tool was changed to `service` instead.
* Windows final comparisons weren't working as they should. Previously, it was comparing the output line-by-line and outputting the set difference of each line. This is fine for footprints which have single-line entries (such as the filesystem and groups); however, the output for the users and services footprinting span several lines for each entry, so the set difference should have been between each (multi-line) entry, rather than each line. I fixed these comparisons where appropriate.
* User can invoke the script from anywhere now. Previously, the script needed to be invoked from its own directory, or the libs would fail to be found.
* Output is now organized into folders.