Skip to content

Instantly share code, notes, and snippets.

@smashism
Created March 23, 2015 15:07
Show Gist options
  • Save smashism/f2a2b564af433d3c5286 to your computer and use it in GitHub Desktop.
Save smashism/f2a2b564af433d3c5286 to your computer and use it in GitHub Desktop.
get_github_version
#!/bin/sh
#
# checks for github.app on machine
# using version integer rather than name
# intended for scoping updates (with patchoo)
# by github.com/smashism
# https://github.com/smashism/casper-extension-attributes/blob/master/get_github_version
# last updated 2015-03-20
#
if [ -f "/Applications/Github.app/Contents/Info.plist" ] ; then
VERSION=$( defaults read "/Applications/Github.app/Contents/Info.plist" CFBundleVersion )
else
VERSION="Not installed."
fi
echo "<result>$VERSION</result>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment