|
|
7a5604 |
#!/bin/bash
|
|
|
7a5604 |
#
|
|
|
f128ea |
# cli_getRepoTLDir.sh -- This function returns the repository top
|
|
|
f128ea |
# level absolute path. The repository top level absolute path may be
|
|
|
f128ea |
# /home/centos/artwork/trunk, /home/centos/artwork/branches, or
|
|
|
7a5604 |
# /home/centos/artwork/tags. This function uses action value to
|
|
|
7a5604 |
# determine which is the top level absolute path being used.
|
|
|
7a5604 |
#
|
|
|
7a5604 |
# Copyright (C) 2009, 2010 Alain Reguera Delgado
|
|
|
7a5604 |
#
|
|
|
7a5604 |
# This program is free software; you can redistribute it and/or
|
|
|
7a5604 |
# modify it under the terms of the GNU General Public License as
|
|
|
7a5604 |
# published by the Free Software Foundation; either version 2 of the
|
|
|
7a5604 |
# License, or (at your option) any later version.
|
|
|
7a5604 |
#
|
|
|
7a5604 |
# This program is distributed in the hope that it will be useful, but
|
|
|
7a5604 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
7a5604 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
7a5604 |
# General Public License for more details.
|
|
|
7a5604 |
#
|
|
|
7a5604 |
# You should have received a copy of the GNU General Public License
|
|
|
7a5604 |
# along with this program; if not, write to the Free Software
|
|
|
7a5604 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
7a5604 |
# USA.
|
|
|
7a5604 |
#
|
|
|
7a5604 |
# ----------------------------------------------------------------------
|
|
|
7a5604 |
# $Id$
|
|
|
7a5604 |
# ----------------------------------------------------------------------
|
|
|
7a5604 |
|
|
|
f128ea |
function cli_getRepoTLDir {
|
|
|
7a5604 |
|
|
|
f128ea |
echo $ACTIONVAL | sed -r \
|
|
|
7a5604 |
-e 's!^(/home/centos/artwork/(trunk|branches|tags)).+$!\1!')
|
|
|
7a5604 |
|
|
|
7a5604 |
}
|