Revert the bash version in the replace function

This commit is contained in:
Serhat Gülçiçek 2013-02-01 08:56:09 +01:00
commit e8778b32a8

View file

@ -160,7 +160,7 @@ replaceVarBy() {
# If we're not using Bash use sed, as we need to support as much as systems possible, also those running sh/dash etc # If we're not using Bash use sed, as we need to support as much as systems possible, also those running sh/dash etc
if [ -n "${BASH_VERSION}" ]; then if [ -n "${BASH_VERSION}" ]; then
REPLACEDRESULT="${1/${2}/${3##*/}}" # get last part after slash for paths REPLACEDRESULT="${1/${2}/${3}}"
else else
REPLACEDRESULT=$(echo "${1}" | sed "s/${2}/${3##*/}/") # get last part after slash for paths REPLACEDRESULT=$(echo "${1}" | sed "s/${2}/${3##*/}/") # get last part after slash for paths
fi fi