We also don't need to sed twice.
This commit is contained in:
parent
b7cfd408f7
commit
42338a48e4
1 changed files with 1 additions and 1 deletions
|
@ -20,12 +20,12 @@ get_setting() {
|
||||||
}
|
}
|
||||||
|
|
||||||
set_setting() {
|
set_setting() {
|
||||||
sed -i "/^$1=/d" "${J_CONF}"
|
|
||||||
if [ "$2" == "disable" ]
|
if [ "$2" == "disable" ]
|
||||||
then
|
then
|
||||||
sed -i "/^#$1=/d" "${J_CONF}"
|
sed -i "/^#$1=/d" "${J_CONF}"
|
||||||
echo "#${1}=" >> "${J_CONF}"
|
echo "#${1}=" >> "${J_CONF}"
|
||||||
else
|
else
|
||||||
|
sed -i "/^$1=/d" "${J_CONF}"
|
||||||
echo "${1}=${2}" >> "${J_CONF}"
|
echo "${1}=${2}" >> "${J_CONF}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue