From 57e44a530d4f158daa545edab331a634cdf3e2cc Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Mar 05 2011 19:30:52 +0000 Subject: Update cli_getPathComponent.sh. --- diff --git a/Scripts/Bash/Cli/Functions/cli_getPathComponent.sh b/Scripts/Bash/Cli/Functions/cli_getPathComponent.sh index 6d0d078..abee102 100755 --- a/Scripts/Bash/Cli/Functions/cli_getPathComponent.sh +++ b/Scripts/Bash/Cli/Functions/cli_getPathComponent.sh @@ -186,15 +186,15 @@ function cli_getPathComponent { case "$OPTION" in '--release' ) - echo "$LOCATION" | sed -r "s!.+/${PATTERN[0]}/?!\1!" + echo "$LOCATION" | sed -r "s!.*/${PATTERN[0]}/.*!\1!" ;; '--release-major' ) - echo "$LOCATION" | sed -r "s!.+/${PATTERN[0]}/?!\2!" + echo "$LOCATION" | sed -r "s!.*/${PATTERN[0]}/.*!\2!" ;; '--release-minor' ) - echo "$LOCATION" | sed -r "s!.+/${PATTERN[0]}/?!\4!" + echo "$LOCATION" | sed -r "s!.*/${PATTERN[0]}/.*!\4!" ;; '--release-pattern' )