Skip to content
Snippets Groups Projects
Commit 3d5654f6 authored by rds's avatar rds
Browse files

added cvs directory navigation

parent fe7130a8
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,12 @@ function zmap_cd
if [ "x$SILENT_CD" != "x$ZMAP_TRUE" ]; then
zmap_message_out "cd $1"
fi
cd $1 || zmap_message_exit "Failed to cd to $1"
if [ "x$SILENT_CD" != "x$ZMAP_TRUE" ]; then
zmap_message_out "Now in $(pwd)"
fi
}
function zmap_mkdir
......@@ -107,6 +112,28 @@ function zmap_pathmunge
fi
}
# Usage: zmap_goto_cvs_module_root
function zmap_goto_cvs_module_root
{
if [ -f CVS/Repository ]; then
LOCATION=$(cat CVS/Repository)
current=$(pwd)
zmap_message_out "Navigating out of $LOCATION"
while [ "x$LOCATION" != "x." ];
do
CVS_MODULE=$(basename $LOCATION)
LOCATION=$(dirname $LOCATION)
zmap_message_out "Leaving $CVS_MODULE."
CVS_MODULE_LOCAL=$(basename $current)
current=$(dirname $current)
zmap_cd $current
done
zmap_cd $CVS_MODULE_LOCAL
else
zmap_message_exit "Failed to find Repository file in CVS directory."
fi
}
# Usage: zmap_trap_handle
function zmap_trap_handle
{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment