summary refs log tree commit diff
diff options
context:
space:
mode:
authorDan Callahan <danc@element.io>2021-10-22 21:44:25 +0100
committerDan Callahan <danc@element.io>2021-10-22 23:08:54 +0100
commit9d0f9d51d5da7ebcd3178fefc1e68c3c5494d673 (patch)
tree32d9f5c79eb578e61b42eac00c70e1801733633d
parentFix Shellcheck SC1091: Can't follow file (diff)
downloadsynapse-9d0f9d51d5da7ebcd3178fefc1e68c3c5494d673.tar.xz
Fix Shellcheck SC2016: Single quotes don't expand
Expressions don't expand in single quotes, use double quotes for that.

https://github.com/koalaman/shellcheck/wiki/SC2016

This specifically warned about the '$aregis...' part of the sed script.
Which is a relatively obscure use of sed.

Splitting this into two commands makes its intent more obvious and
avoids contravening Shellcheck's lints.

Signed-off-by: Dan Callahan <danc@element.io>
-rw-r--r--debian/test/provision.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/debian/test/provision.sh b/debian/test/provision.sh
index 9dc8ab671c..931f300e97 100644
--- a/debian/test/provision.sh
+++ b/debian/test/provision.sh
@@ -19,5 +19,6 @@ EOF
 
 dpkg -i "$deb"
 
-sed -i -e '/port: 8...$/{s/8448/18448/; s/8008/18008/}' -e '$aregistration_shared_secret: secret' /etc/matrix-synapse/homeserver.yaml
+sed -i -e 's/port: 8448$/port: 18448/; s/port: 8008$/port: 18008' /etc/matrix-synapse/homeserver.yaml
+echo 'registration_shared_secret: secret' >> /etc/matrix-synapse/homeserver.yaml
 systemctl restart matrix-synapse