Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PHP Run Script
#!/bin/bash
BIN=""
if [ "$PHP" == "/usr/local/bin/php" ]
then
PHP=""
fi
BIN="/usr/local/php/$1/bin/php"
if [ -x "$BIN" ]
then
shift
else
if [ -x "$BIN" ]
then
BIN="$PHP"
else
if [ -x "/usr/local/php/$PHP/bin/php" ]
then
BIN="/usr/local/php/$PHP/bin/php"
else
BIN="/usr/local/php/master/bin/php"
fi
fi
fi
$BIN $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.