What the project is for
The script called osxapp_vers finds the product name, the complete product version and build version in a
Install*OS X*.app package, in a
Install macOS*.app package or in a mounted CD/DVD image called
Mac OS X Install * and prints the info out like the OS X's /usr/bin/sw_vers does for an installed OS X product.
The idea for this has been described at my blog.
What are the system requirements
- At least Mac OS X 10.6.8 (Snow Leopard) in order to run the script
Install Mac OS X Lion.app,
Install OS X Mountain Lion.app,
Install OS X Mavericks.app,
Install OS X Yosemite.appor
Install OS X El Capitan.app,
Install macOS Sierra.appfrom the Apple App Store (1st public version or any update release) or on a bootable OS X install media that has been created by Apple's
- Alternatively, a mounted Mac OS X Install CD/DVD image such as
Mac OS X Install DVD,
Mac OS X Install CDor
Mac OS X Install Disk
How to configure and install it
Download the osxapp_vers file from GitHub to a folder of your choice and set execute permissions.
$ chmod +x ./osxapp_vers
In order to bypass a check that prevents the script from investigating an unknown macOS release, you can set the NOCHECK environment variable.
$ export NOCHECK=1
In order to see details from the mount actions and additional messages, you can enable debug output by exporting the DEBUG environment variable. Usually there is no need to do that.
$ export DEBUG=/dev/stdout
If you want to disable debug mode, enter
$ export DEBUG=
Examples of how to use it or get it running
By default, if you don't specify any program parameters, the script reads all
/Applications/Install*OS X*.app, all
/Applications/Install macOS X*.app and all
/Volumes/Mac OS X Install * and prints out product name, product version and build version for each OS X that those installers are loaded with.
$ ./osxapp_vers /Applications/Install Mac OS X Lion.app: ProductName: Mac OS X ProductVersion: 10.7.5 BuildVersion: 11G63 /Applications/Install OS X Mavericks.app: ProductName: Mac OS X ProductVersion: 10.9.4 BuildVersion: 13E28 /Applications/Install OS X Mountain Lion.app: ProductName: Mac OS X ProductVersion: 10.8.5 BuildVersion: 12F45 /Applications/Install OS X Yosemite.app: ProductName: Mac OS X ProductVersion: 10.10.2 BuildVersion: 14C109 /Applications/Install OS X El Capitan.app: ProductName: Mac OS X ProductVersion: 10.11.5 BuildVersion: 15F34 /Applications/Install macOS Sierra.app: ProductName: Mac OS X ProductVersion: 10.12 BuildVersion: 16A323 /Volumes/Mac OS X Install DVD: ProductName: Mac OS X ProductVersion: 10.5 BuildVersion: 9A581
If you specify program parameters, the script prints out product name, product version and build version for each Install OS X .app folder that you have specified.
$ ./osxapp_vers '/Applications/Install OS X Mavericks.app' /Applications/Install OS X Mavericks.app: ProductName: Mac OS X ProductVersion: 10.9.4 BuildVersion: 13E28
If you have created a bootable OS X install media with
createinstallmedia (that command line tool is provided by Apple as part of the OS X installer starting with Mavericks), you could also find out the version of OS X version that is on the install media by specifying the path to the .app folder.
./osxapp_vers '/Volumes/Install OS X Mavericks/Install OS X Mavericks.app/' /Volumes/Install OS X Mavericks/Install OS X Mavericks.app/: ProductVersion: 10.9.2 BuildVersion: 13C64
The license that the project is offered under is the Apache 2.0 license.