mirror of https://github.com/zulip/zulip.git
test-install: Fix shellcheck warnings.
In tools/test-install/destroy-all line 31: | while read c ^-- SC2162: read without -r will mangle backslashes. In tools/test-install/install line 57: installer_dir="$(readlink -f $INSTALLER)" ^-- SC2086: Double quote to prevent globbing and word splitting. In tools/test-install/lxc-wait line 30: for i in {1..60}; do ^-- SC2034: i appears unused. Verify use (or export if used externally). Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
e1d770d451
commit
c4ed4bc021
|
@ -28,7 +28,7 @@ fi
|
|||
|
||||
lxc-ls -f \
|
||||
| perl -lane '$_ = $F[0]; print if (/^zulip-install-/ && !/-base$/)' \
|
||||
| while read c
|
||||
| while read -r c
|
||||
do
|
||||
echo "$c"
|
||||
lxc-stop -n "$c"
|
||||
|
|
|
@ -54,7 +54,7 @@ EOF
|
|||
trap 'set +x; echo "$message"' EXIT
|
||||
|
||||
if [ -d "$INSTALLER" ]; then
|
||||
installer_dir="$(readlink -f $INSTALLER)"
|
||||
installer_dir="$(readlink -f "$INSTALLER")"
|
||||
else
|
||||
installer_dir="$(mktemp -d --tmpdir zulip-server-XXXXX)"
|
||||
tar -xf "$INSTALLER" -C "$installer_dir" --transform='s,^[^/]*,zulip-server,'
|
||||
|
|
|
@ -27,7 +27,7 @@ if [ "$EUID" -ne 0 ]; then
|
|||
fi
|
||||
|
||||
# We poll.
|
||||
for i in {1..60}; do
|
||||
for _ in {1..60}; do
|
||||
echo "lxc-wait: $CONTAINER_NAME: polling for boot..." >&2
|
||||
runlevel="$(lxc-attach -n "$CONTAINER_NAME" -- runlevel 2>/dev/null)" \
|
||||
|| { sleep 1; continue; }
|
||||
|
|
Loading…
Reference in New Issue