mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
scripts: Move apt repository setup to its own script.
This commit is contained in:
@@ -15,20 +15,7 @@ DEPLOYMENT_TYPE="${DEPLOYMENT_TYPE:-voyager}"
|
|||||||
PUPPET_CLASSES="${PUPPET_CLASSES:-zulip::voyager}"
|
PUPPET_CLASSES="${PUPPET_CLASSES:-zulip::voyager}"
|
||||||
VIRTUALENV_NEEDED="${VIRTUALENV_NEEDED:-yes}"
|
VIRTUALENV_NEEDED="${VIRTUALENV_NEEDED:-yes}"
|
||||||
|
|
||||||
apt-get install -y lsb-release
|
/root/zulip/scripts/lib/setup-apt-repo
|
||||||
|
|
||||||
# First, install any updates from the apt repo that may be needed
|
|
||||||
wget -qO - https://zulip.com/dist/keys/zulip-ppa.asc | apt-key add -
|
|
||||||
release=$(lsb_release -sc)
|
|
||||||
if [ "$release" = "trusty" ] || [ "$release" = "xenial" ]; then
|
|
||||||
cat >/etc/apt/sources.list.d/zulip.list <<EOF
|
|
||||||
deb http://ppa.launchpad.net/tabbott/zulip/ubuntu $release main
|
|
||||||
deb-src http://ppa.launchpad.net/tabbott/zulip/ubuntu $release main
|
|
||||||
EOF
|
|
||||||
else
|
|
||||||
echo "Unsupported release $release."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get -y dist-upgrade $APT_OPTIONS
|
apt-get -y dist-upgrade $APT_OPTIONS
|
||||||
|
|||||||
18
scripts/lib/setup-apt-repo
Executable file
18
scripts/lib/setup-apt-repo
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -x
|
||||||
|
set -x
|
||||||
|
|
||||||
|
apt-get install -y lsb-release
|
||||||
|
|
||||||
|
# First, install any updates from the apt repo that may be needed
|
||||||
|
wget -qO - https://zulip.com/dist/keys/zulip-ppa.asc | apt-key add -
|
||||||
|
release=$(lsb_release -sc)
|
||||||
|
if [ "$release" = "trusty" ] || [ "$release" = "xenial" ]; then
|
||||||
|
cat >/etc/apt/sources.list.d/zulip.list <<EOF
|
||||||
|
deb http://ppa.launchpad.net/tabbott/zulip/ubuntu $release main
|
||||||
|
deb-src http://ppa.launchpad.net/tabbott/zulip/ubuntu $release main
|
||||||
|
EOF
|
||||||
|
else
|
||||||
|
echo "Unsupported release $release."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user