summary refs log tree commit diff
diff options
context:
space:
mode:
authorDan Callahan <danc@element.io>2021-10-18 16:55:18 +0100
committerDan Callahan <danc@element.io>2021-10-22 23:08:53 +0100
commit64adbb7b5425bb618077e1ab85faede1301de024 (patch)
tree8f8ccf69277819fa73cad55c08e69c720b1dee1c
parentFix Shellcheck SC2164: exit in case cd fails. (diff)
downloadsynapse-64adbb7b5425bb618077e1ab85faede1301de024.tar.xz
Fix Shellcheck SC2046: Quote to prevent word split
Quote this to prevent word splitting

https://www.shellcheck.net/wiki/SC2046

Signed-off-by: Dan Callahan <danc@element.io>
-rwxr-xr-x.ci/scripts/test_export_data_command.sh2
-rwxr-xr-x.ci/scripts/test_synapse_port_db.sh2
-rw-r--r--debian/test/provision.sh2
-rwxr-xr-xdemo/start.sh2
-rwxr-xr-xscripts-dev/check_line_terminators.sh2
-rwxr-xr-xscripts-dev/config-lint.sh2
-rwxr-xr-xscripts-dev/docker_update_debian_changelog.sh2
-rwxr-xr-xscripts-dev/generate_sample_config2
8 files changed, 8 insertions, 8 deletions
diff --git a/.ci/scripts/test_export_data_command.sh b/.ci/scripts/test_export_data_command.sh
index 75f5811d10..2180072c06 100755
--- a/.ci/scripts/test_export_data_command.sh
+++ b/.ci/scripts/test_export_data_command.sh
@@ -3,7 +3,7 @@
 # Test for the export-data admin command against sqlite and postgres
 
 set -xe
-cd `dirname $0`/../..
+cd "`dirname $0`/../.."
 
 echo "--- Install dependencies"
 
diff --git a/.ci/scripts/test_synapse_port_db.sh b/.ci/scripts/test_synapse_port_db.sh
index 50115b3079..7bcbe63654 100755
--- a/.ci/scripts/test_synapse_port_db.sh
+++ b/.ci/scripts/test_synapse_port_db.sh
@@ -7,7 +7,7 @@
 
 
 set -xe
-cd `dirname $0`/../..
+cd "`dirname $0`/../.."
 
 echo "--- Install dependencies"
 
diff --git a/debian/test/provision.sh b/debian/test/provision.sh
index a5c7f59712..9dc8ab671c 100644
--- a/debian/test/provision.sh
+++ b/debian/test/provision.sh
@@ -10,7 +10,7 @@ set -e
 apt-get update
 apt-get install -y lsb-release
 
-deb=`ls /debs/matrix-synapse-py3_*+$(lsb_release -cs)*.deb | sort | tail -n1`
+deb=`ls "/debs/matrix-synapse-py3_*+$(lsb_release -cs)*.deb" | sort | tail -n1`
 
 debconf-set-selections <<EOF
 matrix-synapse matrix-synapse/report-stats boolean false
diff --git a/demo/start.sh b/demo/start.sh
index fc5d08a63b..e426094994 100755
--- a/demo/start.sh
+++ b/demo/start.sh
@@ -8,7 +8,7 @@ cd "$DIR/.." || exit
 
 mkdir -p demo/etc
 
-export PYTHONPATH=$(readlink -f $(pwd))
+export PYTHONPATH=$(readlink -f "$(pwd)")
 
 
 echo $PYTHONPATH
diff --git a/scripts-dev/check_line_terminators.sh b/scripts-dev/check_line_terminators.sh
index 762f848cab..068f157ea1 100755
--- a/scripts-dev/check_line_terminators.sh
+++ b/scripts-dev/check_line_terminators.sh
@@ -25,7 +25,7 @@
 # terminators are found, 0 otherwise.
 
 # cd to the root of the repository
-cd `dirname $0`/.. || exit
+cd "`dirname $0`/.." || exit
 
 # Find and print files with non-unix line terminators
 if find . -path './.git/*' -prune -o -type f -print0 | xargs -0 grep -I -l $'\r$'; then
diff --git a/scripts-dev/config-lint.sh b/scripts-dev/config-lint.sh
index 6b160c8ad2..15c8c2f93a 100755
--- a/scripts-dev/config-lint.sh
+++ b/scripts-dev/config-lint.sh
@@ -3,7 +3,7 @@
 # Exits with 0 if there are no problems, or another code otherwise.
 
 # cd to the root of the repository
-cd `dirname $0`/.. || exit
+cd "`dirname $0`/.." || exit
 
 # Restore backup of sample config upon script exit
 trap "mv docs/sample_config.yaml.bak docs/sample_config.yaml" EXIT
diff --git a/scripts-dev/docker_update_debian_changelog.sh b/scripts-dev/docker_update_debian_changelog.sh
index 89821bba72..14c155aee5 100755
--- a/scripts-dev/docker_update_debian_changelog.sh
+++ b/scripts-dev/docker_update_debian_changelog.sh
@@ -60,5 +60,5 @@ DEBIAN_FRONTEND=noninteractive apt-get install -y devscripts
 
 # Update the Debian changelog.
 ver=${1}
-dch -M -v $(sed -Ee 's/(rc|a|b|c)/~\1/' <<<$ver) "New synapse release $ver."
+dch -M -v "$(sed -Ee 's/(rc|a|b|c)/~\1/' <<<$ver)" "New synapse release $ver."
 dch -M -r -D stable ""
diff --git a/scripts-dev/generate_sample_config b/scripts-dev/generate_sample_config
index 02739894b5..06e4c8c669 100755
--- a/scripts-dev/generate_sample_config
+++ b/scripts-dev/generate_sample_config
@@ -4,7 +4,7 @@
 
 set -e
 
-cd `dirname $0`/..
+cd "`dirname $0`/.."
 
 SAMPLE_CONFIG="docs/sample_config.yaml"
 SAMPLE_LOG_CONFIG="docs/sample_log_config.yaml"