mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 22:03:13 -07:00
Merge pull request #40 from SerhatG/master
Revert the bash version in the replace function
This commit is contained in:
commit
f32fd842f7
1 changed files with 1 additions and 1 deletions
|
@ -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}^g")
|
REPLACEDRESULT=$(echo "${1}" | sed "s^${2}^${3}^g")
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue