Skip to main content
Question

Updating Xcode Command Line Tools through Jamf


Forum|alt.badge.img+4
  • Contributor
  • 18 replies

Hello all,
We deploy Xcode Command Line Tools to all mac machines in our org, one issue is having to deal with Xcode CLI updates.

When trying to update via command line using softwareupdate, it reports installed, then when checking again they will show back up.

Is there a way to update on current macs, or is this just borked?

2 replies

jamf-42
Forum|alt.badge.img+17
  • Esteemed Contributor
  • 741 replies
  • March 6, 2023

you have an EA reporting version?  then scope smart group and use the cli tools pkg  .. via Self Service / other trigger..  sw update bin is deprecated / legacy / not the apple way.. etc.. 

 

#!/bin/sh test=`pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version > /dev/null; echo $?` if [ "$test" = 0 ]; then result=`pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version | sed 's/version: //' | cut -c 1-6` echo "<result>$result</result>" fi

 


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 18 replies
  • March 8, 2023
jamf-42 wrote:

you have an EA reporting version?  then scope smart group and use the cli tools pkg  .. via Self Service / other trigger..  sw update bin is deprecated / legacy / not the apple way.. etc.. 

 

#!/bin/sh test=`pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version > /dev/null; echo $?` if [ "$test" = 0 ]; then result=`pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version | sed 's/version: //' | cut -c 1-6` echo "<result>$result</result>" fi

 


I do not wish to use a PKG I have to maintain, I want to just get the latest release version, and make sure all macs have that installed.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings