This commit is contained in:
Serhat Gülçiçek 2013-02-01 00:06:04 -08:00
commit 56848d18a5

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 [ -n "${BASH_VERSION}" ]; then
REPLACEDRESULT="${1/${2}/${3##*/}}" # get last part after slash for paths
REPLACEDRESULT="${1/${2}/${3}}"
else
REPLACEDRESULT=$(echo "${1}" | sed "s^${2}^${3}^g")
fi