Fixed bug where tts and rate were not saving to the config file.
This commit is contained in:
12
tojam
12
tojam
@ -252,7 +252,17 @@ configure_ninjam() {
|
|||||||
[[ ${menuCode} -ne 0 ]] && continue
|
[[ ${menuCode} -ne 0 ]] && continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
sed -i -e "s/^tts=.*/tts=\"${tts}\"/" -e "s/^ttsRate=.*/ttsRate=\"${ttsRate}\"/" "${config}/config" &&
|
# Update or add TTS settings
|
||||||
|
if grep -q "^tts=" "${config}/config"; then
|
||||||
|
sed -i "s/^tts=.*/tts=\"${tts}\"/" "${config}/config"
|
||||||
|
else
|
||||||
|
echo "tts=\"${tts}\"" >> "${config}/config"
|
||||||
|
fi
|
||||||
|
if grep -q "^ttsRate=" "${config}/config"; then
|
||||||
|
sed -i "s/^ttsRate=.*/ttsRate=\"${ttsRate}\"/" "${config}/config"
|
||||||
|
else
|
||||||
|
echo "ttsRate=\"${ttsRate}\"" >> "${config}/config"
|
||||||
|
fi
|
||||||
if [[ "${tts}" == "true" ]]; then
|
if [[ "${tts}" == "true" ]]; then
|
||||||
dialog --msgbox "TTS enabled at rate ${ttsRate}." -1 -1
|
dialog --msgbox "TTS enabled at rate ${ttsRate}." -1 -1
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user