Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional EAs #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ Specify the install name as the first jamf variable.
Like the *brew-install-program* script this variation is used to install casks where the *brew install --cask <name>* is used.
It is designed to work with the brew install script here and be used in jamf.
Specify the cask name as the first jamf variable.

# wget-version.sh
A Jamf EA to record the version of wget if installed using this brew installer method

# google-cloud-sdk-version.sh
A Jamf EA to record the version of google-cloud-sdk if installed using this brew installer method
24 changes: 24 additions & 0 deletions google-cloud-sdk-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

# EA to find installed package version

RESULT="Not Found"
# Find machine type
UNAME_MACHINE="$(uname -m)"

if [[ "$UNAME_MACHINE" == "arm64" ]]; then
# M1/arm64 machines
if [[ -e /opt/homebrew/Caskroom/google-cloud-sdk ]]; then
RESULT=$(/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud -v | grep "Google" | awk '{ print $4 }')
echo "$RESULT"
fi
else
# Intel machines
if [[ -e /usr/local/Caskroom/google-cloud-sdk ]]; then
RESULT=$(/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud -v | grep "Google" | awk '{ print $4 }')
echo "$RESULT"
fi
fi


echo "<result>$RESULT</result>"
23 changes: 23 additions & 0 deletions wget-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

# EA to find installed package version
RESULT="Not Found"
# Find machine type
UNAME_MACHINE="$(uname -m)"

if [[ "$UNAME_MACHINE" == "arm64" ]]; then
# M1/arm64 machines
if [[ -e /opt/homebrew/bin/wget ]]; then
RESULT=$(/opt/homebrew/bin/wget -V | grep "built on" | awk '{ print $3 }')
echo "$RESULT"
fi
else
# Intel machines
if [[ -e /usr/local/bin/wget ]]; then
RESULT=$(/usr/local/bin/wget -V | grep "built on" | awk '{ print $3 }')
echo "$RESULT"
fi
fi


echo "<result>$RESULT</result>"