Blame Scripts/Functions/cli_getRepoStatus.sh
|
|
c8faf4 |
#!/bin/bash
|
|
|
c8faf4 |
#
|
|
|
c8faf4 |
# cli_getRepoStatus.sh -- This function requests the working copy
|
|
|
5f7975 |
|
|
|
5f7975 |
# output line, as described in svn help status, for the LOCATION
|
|
|
68c0cf |
# specified. Use this function to perform verifications based a
|
|
|
5f7975 |
# repository LOCATION status.
|
|
|
c8faf4 |
#
|
|
|
3b0984 |
# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
|
|
|
fa95b1 |
#
|
|
|
fa95b1 |
# This program is free software; you can redistribute it and/or modify
|
|
|
fa95b1 |
|
|
|
dcd347 |
|
|
|
dcd347 |
|
|
|
fa95b1 |
#
|
|
|
74a058 |
|
|
|
74a058 |
|
|
|
c8faf4 |
|
|
|
c8faf4 |
# General Public License for more details.
|
|
|
c8faf4 |
#
|
|
|
c8faf4 |
|
|
|
c8faf4 |
# along with this program; if not, write to the Free Software
|
|
|
dcd347 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
7ac5a5 |
#
|
|
|
c8faf4 |
# ----------------------------------------------------------------------
|
|
|
c8faf4 |
# $Id$
|
|
|
c8faf4 |
# ----------------------------------------------------------------------
|
|
|
c8faf4 |
|
|
|
c8faf4 |
function cli_getRepoStatus {
|
|
|
c8faf4 |
|
|
|
c01d0e |
local LOCATION="$1"
|
|
|
c8faf4 |
|
|
|
2120de |
|
|
|
2120de |
|
|
|
2120de |
|
|
|
9c0f73 |
local PATTERN='^( |A|C|D|I|M|R|X|!|~).+$'
|
|
|
2120de |
|
|
|
d58ad3 |
|
|
|
d58ad3 |
|
|
|
9c0f73 |
svn status "$LOCATION" --quiet | sed -r "s/${PATTERN}/\1/"
|
|
|
c8faf4 |
|
|
|
c8faf4 |
}
|