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:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user