Skip to content

Commit

Permalink
added XProtect.meta.plist
Browse files Browse the repository at this point in the history
Watching the meta file for plugins
  • Loading branch information
justinrummel committed Feb 24, 2013
1 parent 85f65ad commit 9976e0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Library/LaunchDaemons/com.stonyrivertech.XProtect.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<key>WatchPaths</key>
<array>
<string>/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.plist</string>
<string>/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta.plist</string>
</array>
</dict>
</plist>
2 changes: 2 additions & 0 deletions usr/local/bin/watchProtect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ sourceDir="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/"
destineDir="/Users/Shared/XProtect/"
XPath=".version/"
file="XProtect.plist"
metaFile="XProtect.meta.plist"
version=`/usr/libexec/PlistBuddy -c "print :Version" /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta.plist`

[ ! -d "${destineDir}" ] && { mkdir "${destineDir}"; }
[ ! -d "${destineDir}${XPath}" ] && { mkdir "${destineDir}${XPath}"; }
[ ! -e "${destineDir}${XPath}${version}" ] && {
touch "${destineDir}${XPath}${version}"
cp "${sourceDir}${file}" "${destineDir}${logDateTime}-${file}"
cp "${sourceDir}${metaFile}" "${destineDir}${logDateTime}-${metaFile}"
}

0 comments on commit 9976e0a

Please sign in to comment.