#! /bin/sh

# $Id$
# Written by Jiafu He, jiafu@goldhive.com

# Usage: svnhier n path_to_repo
#        where "n=[1-5]" represents the depth of directory, e.g., 2.

if test x$2 = x; then
    PATH_TO_REPO=/opt/svn/goldhive
else
    PATH_TO_REPO=$2
fi

case "$1" in
    [1-5])
        svnlook tree $PATH_TO_REPO | egrep "^ {1,$1}\w"
        ;;
    *)
        echo 'Usage: svnhier n path_to_repo'
        echo '    where "n=[1-5]" means the depth of directory, e.g., 2.'
        ;;
esac

