Question

I want to know how extract by terminal the Darwin version.

https://en.wikipedia.org/wiki/MacOS_Sierra#Releases

For macOS Sierra 10.12.3 is 16.4.0 for 10.12.6 is 16.7.0.

Now, I want to create:

--build=x86_64-apple-darwin$(uname -r)

Is it possible obtain this complete value?

x86_64-apple-darwin16.4.0
Était-ce utile?

La solution

That is very simple using uname with the r option.

uname -r

and

sysctl -n kern.osrelease

would give you the same results.

Licencié sous: CC-BY-SA avec attribution
Non affilié à apple.stackexchange
scroll top