Blame Scripts/Bash/Functions/Svn/svn_getRepoStatus.sh
|
|
e142db |
#!/bin/bash
|
|
|
e142db |
#
|
|
|
e142db |
# svn_getRepoStatus.sh -- This function requests the working copy
|
|
|
e142db |
|
|
|
e142db |
# output line, as described in svn help status, for the LOCATION
|
|
|
e142db |
# specified. Use this function to perform verifications based a
|
|
|
e142db |
# repository LOCATION status.
|
|
|
e142db |
#
|
|
|
e142db |
# Copyright (C) 2009, 2010, 2011, 2012 The CentOS Project
|
|
|
e142db |
#
|
|
|
e142db |
# This program is free software; you can redistribute it and/or modify
|
|
|
e142db |
|
|
|
e142db |
|
|
|
e142db |
|
|
|
e142db |
#
|
|
|
e142db |
|
|
|
e142db |
|
|
|
e142db |
|
|
|
e142db |
# General Public License for more details.
|
|
|
e142db |
#
|
|
|
e142db |
|
|
|
e142db |
# along with this program; if not, write to the Free Software
|
|
|
e142db |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
e142db |
#
|
|
|
e142db |
# ----------------------------------------------------------------------
|
|
|
e142db |
# $Id$
|
|
|
e142db |
# ----------------------------------------------------------------------
|
|
|
e142db |
|
|
|
e142db |
function svn_getRepoStatus {
|
|
|
e142db |
|
|
|
e142db |
local LOCATION="$1"
|
|
|
e142db |
|
|
|
e142db |
|
|
|
e142db |
|
|
|
e142db |
|
|
|
e142db |
local PATTERN='^( |A|C|D|I|M|R|X|!|~).+$'
|
|
|
e142db |
|
|
|
e142db |
|
|
|
e142db |
|
|
|
e142db |
${SVN} status "$LOCATION" -N --quiet | sed -r "s/${PATTERN}/\1/"
|
|
|
e142db |
|
|
|
e142db |
}
|