[zsh]add crootgit
This commit is contained in:
parent
3cef108dc7
commit
fad6baa93e
@ -129,7 +129,7 @@ sepgrep() {
|
||||
|
||||
gettop ()
|
||||
{
|
||||
local TOPFILE=build/core/envsetup.mk;
|
||||
local TOPFILE=$1;
|
||||
if [ -n "$TOP" -a -f "$TOP/$TOPFILE" ]; then
|
||||
echo $TOP;
|
||||
else
|
||||
@ -150,11 +150,23 @@ gettop ()
|
||||
fi
|
||||
}
|
||||
|
||||
crootgit ()
|
||||
{
|
||||
local TOPFILE=.git/config;
|
||||
T=$(gettop $TOPFILE);
|
||||
if [ "$T" ]; then
|
||||
\cd $(gettop $TOPFILE);
|
||||
else
|
||||
echo "Couldn't locate the top of the tree. Try setting TOP.";
|
||||
fi
|
||||
}
|
||||
|
||||
croot ()
|
||||
{
|
||||
T=$(gettop);
|
||||
local TOPFILE=build/core/envsetup.mk;
|
||||
T=$(gettop $TOPFILE);
|
||||
if [ "$T" ]; then
|
||||
\cd $(gettop);
|
||||
\cd $(gettop $TOPFILE);
|
||||
else
|
||||
echo "Couldn't locate the top of the tree. Try setting TOP.";
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user