|
|
4debce |
#!/bin/bash
|
|
|
4debce |
#
|
|
|
384602 |
# svn_isVersioned.sh -- This function determines whether a location is
|
|
|
4debce |
# under version control or not. When the location is under version
|
|
|
4debce |
# control, this function returns `true'. when the location isn't under
|
|
|
4debce |
# version control, this function returns `false'.
|
|
|
4debce |
#
|
|
|
4debce |
# Copyright (C) 2009, 2010, 2011, 2012 The CentOS Project
|
|
|
4debce |
#
|
|
|
4debce |
# This program is free software; you can redistribute it and/or modify
|
|
|
4debce |
# it under the terms of the GNU General Public License as published by
|
|
|
4debce |
# the Free Software Foundation; either version 2 of the License, or (at
|
|
|
4debce |
# your option) any later version.
|
|
|
4debce |
#
|
|
|
4debce |
# This program is distributed in the hope that it will be useful, but
|
|
|
4debce |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
4debce |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
4debce |
# General Public License for more details.
|
|
|
4debce |
#
|
|
|
4debce |
# You should have received a copy of the GNU General Public License
|
|
|
4debce |
# along with this program; if not, write to the Free Software
|
|
|
4debce |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
4debce |
#
|
|
|
4debce |
# ----------------------------------------------------------------------
|
|
|
4debce |
# $Id$
|
|
|
4debce |
# ----------------------------------------------------------------------
|
|
|
4debce |
|
|
|
384602 |
function svn_isVersioned {
|
|
|
4debce |
|
|
|
5c230a |
local LOCATION=$1
|
|
|
5c230a |
if [[ $LOCATION == '' ]];then
|
|
|
5c230a |
LOCATION=${ACTIONVAL}
|
|
|
5c230a |
fi
|
|
|
5c230a |
|
|
|
4debce |
# Use subversion to determine whether the location is under
|
|
|
4debce |
# version control or not.
|
|
|
5c230a |
${SVN} info $LOCATION > /dev/null 2>&1
|
|
|
4debce |
|
|
|
4debce |
# Verify subversion exit status and print output.
|
|
|
0694e4 |
echo $?
|
|
|
4debce |
|
|
|
4debce |
}
|