rfay/check_git — pull request #5 by oshaughnessy (2013-03-07 21:32:40+00:00)
Title: Updated for FreeBSD support, other minor features

Hi, Ray. Cool script -- thanks for sharing it.

I wanted to run it on FreeBSD, so I made a few changes and wanted to share them back. Here's what I put in the commit message for check_git:

Major changes:
* Try to automatically figure out where nagios utils.sh is located
* Use mktemp for REPO_DIR
* Added support for FreeBSD
* Allow repo arg to be placed anywhere in the command line
* Dynamically generate the GIT_SSH script, simplifying script installation

Minor changes, most in the effort to enable it to run on Linux or FreeBSD:
* Added a default PATH that should be enough for any commands used in the script.
* Took advantage of shell builtins like echo
* Derive script name using shell builtins instead of `echo|sed`
* Added some usage shortcuts: -h, -v, --key or -k
* Normalized whitespacing

Again, thanks for sharing. This will be very useful.