Skip to content

Instantly share code, notes, and snippets.

@kitzy
Created March 22, 2017 15:49
Show Gist options
  • Save kitzy/f5b2fefbbe10e9d408fc262a3d6c3692 to your computer and use it in GitHub Desktop.
Save kitzy/f5b2fefbbe10e9d408fc262a3d6c3692 to your computer and use it in GitHub Desktop.
A simple script that can be used as a Jamf Extension Attribute to check if a file was installed from the Mac App Store or not.
#!/bin/bash
APP=""
if [ ! -e "/Applications/${APP}.app" ]
then
echo "<result>Not Installed</result>"
elif [ -e "/Applications/${APP}.app/Contents/_MASReceipt" ]
then
echo "<result>Mac App Store</result>"
else
echo "<result>Self Service</result>"
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment