File tree Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ set_value() {
4646 var_name=" ${2} "
4747 tx_var_name=" ${3} "
4848 var_value=" ${4} "
49-
49+
5050 echo " Configuring ${rule} for ${var_name} with ${tx_var_name} =${var_value} "
5151
5252 # For each rule, we do one pass to uncomment the rule (up to first blank line after the rule),
6868 # and whether the expression is enclosed in single quotes.
6969 # Use `#` as pattern delimiter, as `/` is part of some variable values.
7070 # Try to find and update the variable (with or without quotes)
71- if ed -s " ${setup_conf_path} " << EOF 2 > /dev/null
72- /id:${rule} /
73- /setvar:tx\.${tx_var_name} =/
74- s#=[^,"']*#=${var_value} #
75- wq
76- EOF
77- then
78- # Success with unquoted pattern
79- true
80- else
81- # Try with quoted pattern
82- ed -s " ${setup_conf_path} " << EOF 2 > /dev/null
71+ ed -s " ${setup_conf_path} " << EOF 2 > /dev/null
8372/id:${rule} /
84- /setvar:'tx\.${tx_var_name} =/
85- s#=[^'"]'\" #=${var_value} '\" #
73+ /setvar:'\? tx\.${tx_var_name} =/
74+ s#=[^, '"]\+ #=${var_value} #
8675wq
8776EOF
88- fi
8977}
9078
9179should_set () {
You can’t perform that action at this time.
0 commit comments