create-zulip-admin: Fix shellcheck warnings.

In scripts/lib/create-zulip-admin line 3:
if ([ "$ZULIP_USER_CREATION_ENABLED" == "True" ] || [ "$ZULIP_USER_CREATION_ENABLED" == "true" ]) && \
   ^-- SC2235: Use { ..; } instead of (..) to avoid subshell overhead.

In scripts/lib/create-zulip-admin line 4:
   ([ -z "$ZULIP_USER_DOMAIN" ]   || \
   ^-- SC2235: Use { ..; } instead of (..) to avoid subshell overhead.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg 2018-08-03 00:14:46 +00:00 committed by Tim Abbott
parent 5b4d30abab
commit 7162ac43a6
1 changed files with 5 additions and 5 deletions

View File

@ -1,10 +1,10 @@
#!/bin/bash
if ([ "$ZULIP_USER_CREATION_ENABLED" == "True" ] || [ "$ZULIP_USER_CREATION_ENABLED" == "true" ]) && \
([ -z "$ZULIP_USER_DOMAIN" ] || \
[ -z "$ZULIP_USER_EMAIL" ] || \
[ -z "$ZULIP_USER_FULLNAME" ] || \
[ -z "$ZULIP_USER_PASS" ]); then
if { [ "$ZULIP_USER_CREATION_ENABLED" == "True" ] || [ "$ZULIP_USER_CREATION_ENABLED" == "true" ]; } && \
{ [ -z "$ZULIP_USER_DOMAIN" ] || \
[ -z "$ZULIP_USER_EMAIL" ] || \
[ -z "$ZULIP_USER_FULLNAME" ] || \
[ -z "$ZULIP_USER_PASS" ]; }; then
echo "No zulip user configuration given."
exit 1
fi