From 52051df07cce304391ca20ba0e1cb4331a04589d Mon Sep 17 00:00:00 2001 From: Artem Sheremet Date: Tue, 24 Dec 2013 13:16:42 +0300 Subject: [PATCH] webui: support branching with subdirs --- .rc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.rc b/.rc index b052268..ea0ff59 100644 --- a/.rc +++ b/.rc @@ -107,14 +107,13 @@ alias su='su -m' function webui() { if [ -n "$1" ]; then if [ "$1" = "trunk" ]; then - webui="$RAILS/trunk" + webui="${RAILS/BRANCH/trunk}" else - webui="$RAILS/branches/$1" + webui="${RAILS/BRANCH/branches/$1}" fi echo $webui >~/.webui else - webui=$(cat ~/.webui 2>/dev/null) - [ $? -eq 0 ] || webui="$RAILS" + [ -s ~/.webui ] && webui=$(<~/.webui) fi cd $webui } @@ -235,7 +234,7 @@ if [ -x "$(which dircolors 2>/dev/null)" ]; then eval $(dircolors) fi -webui="$RAILS" +webui="${RAILS/BRANCH*/}" case $- in *i*)