| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function cli_checkOptionValue { |
| |
| |
| if [[ $OPTIONVAL =~ '(\.\.(/)?)' ]];then |
| cli_printMessage "`gettext "The path provided can't be processed."`" |
| cli_printMessage "$(caller)" "AsToKnowMoreLine" |
| fi |
| if [[ ! $OPTIONVAL =~ '^[A-Za-z0-9\./-]+$' ]];then |
| cli_printMessage "`gettext "The path provided can't be processed."`" |
| cli_printMessage "$(caller)" "AsToKnowMoreLine" |
| fi |
| |
| |
| |
| |
| |
| |
| |
| |
| if [[ $OPTIONVAL =~ '^(trunk|branches|tags)' ]];then |
| OPTIONVAL=/home/centos/artwork/$OPTIONVAL |
| fi |
| |
| |
| |
| |
| if [[ -d $OPTIONVAL ]];then |
| |
| |
| pushd "$OPTIONVAL" > /dev/null |
| |
| |
| OPTIONVAL=$(pwd) |
| |
| |
| popd > /dev/null |
| |
| else |
| cli_printMessage "`gettext "The path provided is not a valid directory."`" |
| cli_printMessage "$(caller)" "AsToKnowMoreLine" |
| fi |
| |
| } |