| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function cli_checkRepoDirSource { |
| |
| |
| |
| cli_checkPathComponent "$ACTIONVAL" '--default' |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| if [[ $ACTIONVAL =~ '^(trunk|branches|tags)' ]];then |
| ACTIONVAL=/home/centos/artwork/$ACTIONVAL |
| fi |
| |
| |
| |
| |
| |
| |
| |
| |
| if [[ -d ${ACTIONVAL} ]];then |
| |
| |
| pushd "$ACTIONVAL" > /dev/null |
| |
| |
| if [[ $(pwd) =~ '^/home/centos/artwork' ]];then |
| |
| ACTIONVAL=$(pwd) |
| else |
| cli_printMessage "`eval_gettext "The location \\\`\\\$ACTIONVAL' is not valid."`" 'AsErrorLine' |
| cli_printMessage "$(caller)" 'AsToKnowMoreLine' |
| fi |
| |
| # Remove directory from the directory stack. |
| popd > /dev/null |
| |
| elif [[ -f ${ACTIONVAL} ]];then |
| |
| # Add directory to the top of the directory stack. |
| pushd "$(dirname "$ACTIONVAL")" > /dev/null |
| |
| # Check directory existence inside the repository. |
| if [[ $(pwd) =~ '^/home/centos/artwork' ]];then |
| # Re-define source value using absolute path. |
| ACTIONVAL=$(pwd)/$(basename "$ACTIONVAL") |
| else |
| cli_printMessage "`eval_gettext "The location \\\`\\\$ACTIONVAL' is not valid."`" 'AsErrorLine' |
| cli_printMessage "$(caller)" 'AsToKnowMoreLine' |
| fi |
| |
| |
| popd > /dev/null |
| |
| else |
| |
| |
| |
| |
| |
| cli_printMessage "`eval_gettext "The location \\\`\\\$ACTIONVAL' is not valid."`" 'AsErrorLine' |
| cli_printMessage "$(caller)" 'AsToKnowMoreLine' |
| |
| fi |
| |
| } |
| |