1
0
mirror of https://github.com/zokradonh/kopano-docker.git synced 2026-08-11 16:32:59 +00:00

make sed match on the config option with both single and double quotes

fixes https://github.com/zokradonh/kopano-docker/issues/452

Signed-off-by: Felix Bartels <felix@host-consultants.de>
This commit is contained in:
Felix Bartels
2020-09-23 14:20:17 +02:00
parent 08100a3b80
commit a156732e86
3 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -15,10 +15,10 @@ php_cfg_gen() {
case $cfg_value in
# TODO stop after the first match (currently matching incl. closing quote)
true|TRUE|false|FALSE)
sed -ri "s#(\s*define).+${cfg_setting}\x27.+#\tdefine(\x27${cfg_setting}\x27, ${cfg_value}\);#g" "$cfg_file"
sed -ri "s#(\s*define).+(${cfg_setting}\x22|${cfg_setting}\x27)\.+#\tdefine(\x22${cfg_setting}\x22, ${cfg_value}\);#g" "$cfg_file"
;;
*)
sed -ri "s#(\s*define).+${cfg_setting}\x27.+#\tdefine(\x27${cfg_setting}\x27, \x27${cfg_value}\x27\);#g" "$cfg_file"
sed -ri "s#(\s*define).+(${cfg_setting}\x22|${cfg_setting}\x27).+#\tdefine(\x22${cfg_setting}\x22, \x22${cfg_value}\x22\);#g" "$cfg_file"
;;
esac
else