Skip to content

Instantly share code, notes, and snippets.

@smashism
Created August 22, 2015 16:58
Show Gist options
  • Save smashism/f90200e947620d24deb1 to your computer and use it in GitHub Desktop.
Save smashism/f90200e947620d24deb1 to your computer and use it in GitHub Desktop.
omnigraffle5 ea
#!/bin/sh
#
# by emily k 2014-06-10
# checks for omnigraffle 5 sn
# updated 2015-08-21
#gets current user
currentUser=`ls -l /dev/console | cut -d " " -f 4`
#checks for app, then checks user library for license file
if [ -d "/Applications/OmniGraffle Professional 5.app" ]; then
result=`cat /Users/$currentUser/Library/Application\ Support/Omni\ Group/Software\ Licenses/OmniGraffle-*.omnilicense | grep -A 1 Key | grep string | sed 's/<string>//g' | sed 's/<\/string>//g' | awk '{print $1}'`
else
result="Not Installed."
fi
echo "<result>$result</result>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment