writesetting: Allow use of /
This commit is contained in:
parent
e314382760
commit
062d16f0ea
@ -36,7 +36,7 @@ readSetting() { # $1=filename $2=name $3=defaultvalue
|
|||||||
writeSetting() { #$1=filename $2=valuename $3=value
|
writeSetting() { #$1=filename $2=valuename $3=value
|
||||||
local -r LINE=$(grep "^${2}=" "${1}")
|
local -r LINE=$(grep "^${2}=" "${1}")
|
||||||
if [ "${LINE}" != "" ]; then
|
if [ "${LINE}" != "" ]; then
|
||||||
sed -i "s/^${2}=.*/${2}=${3}/" "${1}"
|
sed -i "s/^${2}=.*/${2}=${3//\//\\\/}/" "${1}"
|
||||||
else
|
else
|
||||||
echo "${2}=${3}" >> "${1}"
|
echo "${2}=${3}" >> "${1}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user