Skip to content

darwin (Mac OS X) Tools


Tools to work with Darwin, Mac OS X's version of UNIX.

isDarwin

Are we on Mac OS X?

Usage

isDarwin

Are we on Mac OS X?

Location: bin/build/tools/darwin.sh

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

darwinDialog

Display a dialog using osascript with the choices provided. Typically

Usage

darwinDialog [ --choice choiceText ] [ --ok ] [ --cancel ] --default buttonIndex [ --help ] message ...

Display a dialog using osascript with the choices provided. Typically this is found on Mac OS X. Outputs the selected button text upon exit.

Location: bin/build/tools/darwin.sh

Arguments

  • --choice choiceText - String. Optional. Title of the thing.
  • --ok - Flag. Optional. Adds "OK" as an option.
  • --cancel - Flag. Optional. Adds "Cancel" as an option.
  • --default buttonIndex - Integer. Required. The button (0-based index) to make the default button choice.
  • --help - Flag. Optional. Display this help.
  • message ... - String. Required. The message to display in the dialog.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

darwinNotification

Display a notification for the user

Usage

darwinNotification [ --title ] [ --debug ] [ --sound soundName ] [ message ... ]

Display a notification for the user

Location: bin/build/tools/darwin.sh

Arguments

  • --title - String. Optional. Title of the notification.
  • --debug - Flag. Optional. Output the osascript as darwinNotification.debug at the application root after this call.
  • --sound soundName - String. Optional. Sound to play with the notification. Represents a sound base name found in /Library/Sounds/.
  • message ... - String. Optional. Message to display to the user in the dialog.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

Sounds in Darwin

darwinSoundDirectory

Directory for user sounds

Usage

darwinSoundDirectory

Directory for user sounds

Location: bin/build/tools/darwin.sh

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

darwinSoundInstall

Install a sound file for notifications

Usage

darwinSoundInstall [ --help ] soundFile ... [ --create ]

Install a sound file for notifications

Location: bin/build/tools/darwin.sh

Arguments

  • --help - Flag. Optional. Display this help.
  • soundFile ... - File. Required. Sound file(s) to install in user library.
  • --create - Flag. Optional. Create sound directory if it does not exist.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

darwinSoundNames

List valid sound names usable for notifications in Darwin

Usage

darwinSoundNames

List valid sound names usable for notifications in Darwin

Location: bin/build/tools/darwin.sh

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

darwinSoundValid

Is a Darwin sound name valid?

Usage

darwinSoundValid

Is a Darwin sound name valid?

Location: bin/build/tools/darwin.sh

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

🛠️ Tools · ⬅ Top