Created
March 22, 2017 15:49
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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