From b8ce891aca3b866fa91625fa125c379afc75a06d Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Dec 07 2010 17:15:36 +0000 Subject: Add isInWorkingCopy option to cli_checkFiles. In cli_getRepoStatus function: - Fix regular expression pattern. - Fix location verification. --- diff --git a/Scripts/Bash/Functions/cli_checkFiles.sh b/Scripts/Bash/Functions/cli_checkFiles.sh index fd46136..05f5be9 100644 --- a/Scripts/Bash/Functions/cli_checkFiles.sh +++ b/Scripts/Bash/Functions/cli_checkFiles.sh @@ -106,6 +106,13 @@ function cli_checkFiles { fi ;; + isInWorkingCopy ) + # To exist, file should be inside the working copy. + if [[ $FILE =~ "^/home/centos/artwork/.+$" ]];then + MESSAGE="`eval_gettext "The path \\\"\\\$FILE\\\" doesn't exist inside the working copy."`" + fi + ;; + * ) # File exists. if [[ ! -a $FILE ]];then diff --git a/Scripts/Bash/Functions/cli_getRepoStatus.sh b/Scripts/Bash/Functions/cli_getRepoStatus.sh index 001b26f..24494a2 100755 --- a/Scripts/Bash/Functions/cli_getRepoStatus.sh +++ b/Scripts/Bash/Functions/cli_getRepoStatus.sh @@ -35,12 +35,13 @@ function cli_getRepoStatus { # Define regular expression pattern to retrive first column, # returned by subversion status command. This column is one # character column as describes `svn help status' command. - local PATTERN="^( |A|C|D|I|M|R|X|\?|!|~]).+$" + local PATTERN="^( |A|C|D|I|M|R|X|\?|!|~).+$" # Verify the file used as source to retrive its status # information. We only use regular files or directories inside the # working copy. cli_checkFiles "$LOCATION" 'fd' + cli_checkFiles "$LOCATION" 'isInWorkingCopy' # Use subversion `status' command to retrive the first character # in the output.