From 9784629109d63539f8a2341d14863960ecb69f31 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Feb 05 2011 01:58:34 +0000 Subject: Update cli_getRepoName.sh. --- diff --git a/Scripts/Bash/Functions/cli_getRepoName.sh b/Scripts/Bash/Functions/cli_getRepoName.sh index b9c48c3..2f138ea 100755 --- a/Scripts/Bash/Functions/cli_getRepoName.sh +++ b/Scripts/Bash/Functions/cli_getRepoName.sh @@ -93,11 +93,13 @@ function cli_getRepoName { for DIR in $DIRS;do - # Sanitate path component. - DIR=$(echo ${DIR} \ - | tr -s ' ' '_' \ - | tr '[:upper:]' '[:lower:]' \ - | sed -r 's/^([[:alpha:]])/\u\1/') + # Sanitate directory component. + if [[ ! $DIR =~ '^[A-Z]{1}' ]];then + DIR=$(echo ${DIR} \ + | tr -s ' ' '_' \ + | tr '[:upper:]' '[:lower:]' \ + | sed -r 's/^([[:alpha:]])/\u\1/') + fi # Rebuild path using sanitated values. CLEANDIRS="${CLEANDIRS}/$DIR"