-
Notifications
You must be signed in to change notification settings - Fork 47
/
Bradford_Agent_Version.xml
34 lines (34 loc) · 1.47 KB
/
Bradford_Agent_Version.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0" encoding="UTF-8"?><extensionAttribute>
<displayName>Bradford Agent Version</displayName>
<description>This will display the version of the Bradford Agent</description>
<dataType>string</dataType>
<scriptContentsMac>#!/bin/sh
#################################
# Original Code By Chris Tangora
# Updated by Christopher Miller
# of ITSD-ISS for JHU-APL
# Dated: 20151001
#################################
# Look for the newer app version info
if [[ -e "/Library/Application Support/Bradford Networks/Persistent Agent/CSA.app/Contents/Info.plist" ]];
then
BPAv=$(/usr/bin/defaults read "/Library/Application Support/Bradford Networks/Persistent Agent/CSA.app/Contents/Info.plist" | grep CFBundleGetInfoString | awk {'print $3'} | sed -e 's/[";]//g')
# Look for the older app version info
elif [[ -e /Library/Application\ Support/Bradford\ Networks/Persistent\ Agent/CSA.app/Contents/Resources/bncsaui.xrs ]];
then
BPAv=$( zipgrep Version /Library/Application\ Support/Bradford\ Networks/Persistent\ Agent/CSA.app/Contents/Resources/bncsaui.xrs | sed -e 's|.*\Version\:\ ||' -e 's|\<br.*||' )
# If nothing found, 'taint installed
else
BPAv="Not Installed"
fi
# Spit out the result
echo "<result>$BPAv</result>"
exit 0</scriptContentsMac>
<scriptContentsWindows/>
</extensionAttribute>