Skip to content

Instantly share code, notes, and snippets.

@sandervd
Created November 12, 2015 14:28
Show Gist options
  • Save sandervd/4ab7e12e0b1c78def658 to your computer and use it in GitHub Desktop.
Save sandervd/4ab7e12e0b1c78def658 to your computer and use it in GitHub Desktop.
drush() {
local git_root in_git local_drush
git_root=`git rev-parse --show-cdup 2>/dev/null`
in_git=$?
if [ $in_git = 0 ]; then
local_drush=$git_root"vendor/bin/drush"
if [ -e $local_drush ]; then
command $local_drush "$@"
return "$?"
fi
fi
command drush "$@"
}
phing() {
local git_root in_git local_phing
git_root=`git rev-parse --show-cdup 2>/dev/null`
in_git=$?
if [ $in_git = 0 ]; then
local_phing=$git_root"vendor/bin/phing"
if [ -e $local_phing ]; then
command $local_phing "$@"
return "$?"
fi
fi
command phing "$@"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment