Last active
August 29, 2015 13:55
-
-
Save matglas/8734874 to your computer and use it in GitHub Desktop.
Go to a kw directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Include this script in your .bashrc like this: | |
# . ~/scripts/kwscripts | |
ROOT="/home/vhosts/" | |
function kws() { | |
project=$1 | |
vhosts=$ROOT | |
cd "$vhosts$project/src" | |
} | |
function kwb() { | |
project=$1 | |
vhosts=$ROOT | |
cd "$vhosts$project/build" | |
} | |
function kwp() { | |
project=$1 | |
profile=$2 | |
vhosts=$ROOT | |
if [ "$profile" == "" ] | |
then | |
cd "$vhosts$project/build/profiles/$project" | |
else | |
cd "$vhosts$project/build/profiles/$profile" | |
fi | |
} | |
function kwresetbranch() { | |
project=$1 | |
branch=$2 | |
vhosts=$ROOT | |
cd "$vhosts$project/src" | |
git checkout $branch | |
git pull | |
drush kw-b | |
cd "$vhosts$project/build" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment