Skip to content

Instantly share code, notes, and snippets.

@gheydon
Created November 12, 2014 12:31
Show Gist options
  • Save gheydon/481608af482f2b6dfba3 to your computer and use it in GitHub Desktop.
Save gheydon/481608af482f2b6dfba3 to your computer and use it in GitHub Desktop.
Automatically adding the path to the correct version on PHP in MAMP
#!/bin/sh
# Get the current version of php from the MAMP defaults.
php_version=`defaults read de.appsolute.mamppro phpVersion`
# Export the paths for all MAMP binaries.
export PATH=/Applications/MAMP/bin:/Applications/MAMP/bin/php/php$php_version/bin:/Applications/MAMP/Library/bin:$PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment