Macjutsu / super

S.U.P.E.R.M.A.N. optimizes the macOS software update experience.
Apache License 2.0
605 stars 82 forks source link

Reducing python dependency? #103

Closed jelockwood closed 11 months ago

jelockwood commented 1 year ago

Super is using the installinstallmacos.py script which I have also used previously and this obviously requires Python. Super makes sure that all the bits it needs are available.

However Super also seems itself to use Python to retrieve a Jamf API token and this is not I believe necessary. I myself try and avoid using Python in shell scripts so as to avoid a dependency on a Python being installed since this is no longer included as standard.

As installinstallmacos.py does need Python and Super can re-use the same Python this in this case is perhaps a pedantic issue but it should be possible to modify line 2961 of Super so as to not require using Python.

I believe this approach was used to make it work on older macOS versions but the following may be an alternative non-python solution.

jamfProTOKEN=$(echo "$commandRESULT" | grep 'token' | tr -d '"',',' | sed -e 's#token :##' | xargs)

Macjutsu commented 11 months ago

https://github.com/Macjutsu/super/releases/tag/v4.0.0-beta1