From ae29950c9702163bd9276beafb5b60c8caefe7e8 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Nov 26 2010 21:55:07 +0000 Subject: Update cli_commitRepoChanges.sh: - Add LOCATION variable to clarify source location used to perform tasks on. --- diff --git a/Scripts/Bash/Functions/cli_commitRepoChanges.sh b/Scripts/Bash/Functions/cli_commitRepoChanges.sh index 92389cb..dcae29a 100755 --- a/Scripts/Bash/Functions/cli_commitRepoChanges.sh +++ b/Scripts/Bash/Functions/cli_commitRepoChanges.sh @@ -38,25 +38,27 @@ function cli_commitRepoChanges { local LOCALFILES='' local CHNGDIRECTION='' local CHNGTOTAL=0 + local LOCATION='' # If the first argument is provided to cli_commitRepoChanges is a - # valid regular file or directory, make ACTIONVAL local to this - # function and use the first argument as path location to work - # with. If first argument is not a file, nor a directory, or - # simply is not provided, the ACTIONVAL variable default value is - # used instead. + # valid regular file or directory, use the first argument as path + # location to work with. If first argument is not a file, nor a + # directory, or simply is not provided, the ACTIONVAL variable + # default value is used instead. if [[ -f "$1" || -d "$1" ]];then - local ACTIONVAL=$1 + LOCATION="$1" + else + LOCATION="$ACTIONVAL" fi # Update working copy. echo '----------------------------------------------------------------------' cli_printMessage "`gettext "Bringing changes from the repository into the working copy"`" 'AsResponseLine' - UPDATEOUT=$(svn update ${ACTIONVAL}) + UPDATEOUT=$(svn update ${LOCATION}) # Check working copy status. cli_printMessage "`gettext "Checking changes in the working copy"`" 'AsResponseLine' - STATUSOUT=$(svn status ${ACTIONVAL}) + STATUSOUT=$(svn status ${LOCATION}) echo '----------------------------------------------------------------------' # Define path of files considered recent modifications from