Skip to content

Instantly share code, notes, and snippets.

@ryanaslett
Created September 12, 2015 04:36
Show Gist options
  • Save ryanaslett/c00d30bce4af650def5d to your computer and use it in GitHub Desktop.
Save ryanaslett/c00d30bce4af650def5d to your computer and use it in GitHub Desktop.
root@d8dc3dd9b155:/# which php
/opt/phpenv/shims/php
root@d8dc3dd9b155:/# more /opt/phpenv/shims/php
#!/usr/bin/env bash
set -e
[ -n "$RBENV_DEBUG" ] && set -x
program="${0##*/}"
if [ "$program" = "ruby" ]; then
for arg; do
case "$arg" in
-e* | -- ) break ;;
*/* )
if [ -f "$arg" ]; then
export RBENV_DIR="${arg%/*}"
break
fi
;;
esac
done
fi
export RBENV_ROOT="/opt/phpenv"
exec "/opt/phpenv/libexec/rbenv" exec "$program" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment