make croot slightly more useful

Have croot take an argument of a directory to end up in,
so we can jump around the tree even faster.

Change-Id: Ieb6a8d47fee0412006a11192b29ed44604961312
This commit is contained in:
Marie Janssen 2016-04-21 16:53:39 -07:00
parent 9ecf54456c
commit 32ec50a1f1

View file

@ -922,7 +922,11 @@ function croot()
{
T=$(gettop)
if [ "$T" ]; then
\cd $(gettop)
if [ "$1" ]; then
\cd $(gettop)/$1
else
\cd $(gettop)
fi
else
echo "Couldn't locate the top of the tree. Try setting TOP."
fi