Blame Scripts/Functions/cli_isVersioned.sh

3617b9
#!/bin/bash
3617b9
#
3617b9
# cli_isVersioned.sh -- This function determines whether a location is
3617b9
# under version control or not. When the location is under version
3617b9
# control, this function returns `0'. when the location isn't under
3617b9
# version control, this function returns `1'.
3617b9
#
3617b9
# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
3617b9
#
3617b9
# This program is free software; you can redistribute it and/or modify
3617b9
# it under the terms of the GNU General Public License as published by
3617b9
# the Free Software Foundation; either version 2 of the License, or (at
3617b9
# your option) any later version.
3617b9
#
3617b9
# This program is distributed in the hope that it will be useful, but
3617b9
# WITHOUT ANY WARRANTY; without even the implied warranty of
3617b9
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3617b9
# General Public License for more details.
3617b9
#
3617b9
# You should have received a copy of the GNU General Public License
3617b9
# along with this program; if not, write to the Free Software
3617b9
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3617b9
#
3617b9
# ----------------------------------------------------------------------
3617b9
# $Id$
3617b9
# ----------------------------------------------------------------------
3617b9
3617b9
function cli_isVersioned {
3617b9
3617b9
    # Use subversion to determine whether file is under version
3617b9
    # control or not.
3617b9
    svn info $LOCATION &> /dev/null
3617b9
3617b9
}