mirror of https://github.com/zulip/zulip.git
test-install: Pass options through to the installer.
This will facilitate testing interesting installer features using its own CLI. On my laptop, with a recent base image (updated a few days ago with `prepare-base`), it takes just 7 or 8 seconds to get to the installer running, as timed by passing `--help` so that the installer promptly exits.
This commit is contained in:
parent
de7abd8f78
commit
d7e2190b85
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
usage() {
|
||||
echo "usage: install -r RELEASE TARBALL" >&2
|
||||
echo "usage: install -r RELEASE TARBALL [...installer opts..]" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@ while true; do
|
|||
esac
|
||||
done
|
||||
INSTALLER="$1"; shift
|
||||
INSTALLER_ARGS=("$@"); set --
|
||||
|
||||
if [ -z "$RELEASE" ] || [ -z "$INSTALLER" ]; then
|
||||
usage
|
||||
|
@ -71,7 +72,8 @@ run apt-get install -y curl
|
|||
|
||||
<"$INSTALLER" run dd of=/tmp/zulip-server.tar.gz
|
||||
run tar -xf /tmp/zulip-server.tar.gz -C /tmp/
|
||||
run sh -c '/tmp/zulip-server-*/scripts/setup/install'
|
||||
installer_path=$(run sh -c 'echo /tmp/zulip-server-*/scripts/setup/install')
|
||||
run "$installer_path" "${INSTALLER_ARGS[@]}"
|
||||
# TODO install ends as a zombie (workaround: `sudo ps aux | grep lxc-attach`, kill that)
|
||||
|
||||
# TODO settings.py, initialize-database, create realm
|
||||
|
|
Loading…
Reference in New Issue