#!/bin/bash
function switchto() {
+ export OLD_WEBKIT_DIR=$WEBKIT_DIR
export WEBKIT_DIR=~/Projects/WebKit.$1
- if [[ -f ${WEBKIT_DIR}/webkitenv ]]; then
- source ${WEBKIT_DIR}/webkitenv
+ if [[ "$OLD_WEBKIT_DIR" == "" ]]; then
+ export PATH=$PATH:$WEBKIT_DIR/OpenSource/Tools:$WEBKIT_DIR/OpenSource/Tools/Scripts:$WEBKIT_DIR/Internal/Tools/Scripts
+ else
+ export PATH=$(echo $PATH | sed -e "s;$OLD_WEBKIT_DIR;$WEBKIT_DIR;g")
fi
+ export OLD_WEBKIT_DIR=
+
+ alias opensource="cd $WEBKIT_DIR/OpenSource"
+ alias internal="cd $WEBKIT_DIR/Internal"
+ source $WEBKIT_DIR/OpenSource/Tools/Scripts/webkit-tools-completion.sh
}
function _switchto_complete() {
complete -F _switchto_complete switchto
+export PS1='$( if [ $? = 0 ]; then echo \[\e[32m\]:-\)\ ; else echo \[\e[31m\]:-\(\ ;fi;)\[\e[0m\]$(__git_ps1 "(%s) ")\u@\h:$(short_pwd)> '
+source ~/bin/git-completion.bash
+
switchto PuzzleBox
\ No newline at end of file