setup-apt-repo: Clean up setup code for apt repo.

This fixes adding the Ubuntu repositories for Debian, as well as makes
sure that we install the debian-archive-keyring package on Debian,
which is only priority important (and thus might be missing).
This commit is contained in:
Tim Abbott 2018-05-05 09:53:14 -07:00
parent 4ee762a52c
commit 76fa29085a
1 changed files with 3 additions and 3 deletions

View File

@ -8,12 +8,11 @@ zulip_source_hash=`sha1sum $SOURCES_FILE`
apt-get install -y lsb-release apt-transport-https apt-get install -y lsb-release apt-transport-https
SCRIPTS_PATH="$(dirname $(dirname $0))" SCRIPTS_PATH="$(dirname $(dirname $0))"
# Add the apt keys
apt-key add "$SCRIPTS_PATH"/setup/zulip-ppa.asc
apt-key add "$SCRIPTS_PATH"/setup/pgroonga-ppa.asc
release=$(lsb_release -sc) release=$(lsb_release -sc)
if [ "$release" = "trusty" ] || [ "$release" = "xenial" ] || [ "$release" = "zesty" ]; then if [ "$release" = "trusty" ] || [ "$release" = "xenial" ] || [ "$release" = "zesty" ]; then
apt-key add "$SCRIPTS_PATH"/setup/pgroonga-ppa.asc
apt-key add "$SCRIPTS_PATH"/setup/zulip-ppa.asc
cat >/etc/apt/sources.list.d/zulip.list <<EOF cat >/etc/apt/sources.list.d/zulip.list <<EOF
deb http://ppa.launchpad.net/groonga/ppa/ubuntu $release main deb http://ppa.launchpad.net/groonga/ppa/ubuntu $release main
deb http://ppa.launchpad.net/tabbott/zulip/ubuntu $release main deb http://ppa.launchpad.net/tabbott/zulip/ubuntu $release main
@ -21,6 +20,7 @@ deb-src http://ppa.launchpad.net/groonga/ppa/ubuntu $release main
deb-src http://ppa.launchpad.net/tabbott/zulip/ubuntu $release main deb-src http://ppa.launchpad.net/tabbott/zulip/ubuntu $release main
EOF EOF
elif [ "$release" = "stretch" ]; then elif [ "$release" = "stretch" ]; then
apt-get install -y debian-archive-keyring
apt-key add "$SCRIPTS_PATH"/setup/packagecloud.asc apt-key add "$SCRIPTS_PATH"/setup/packagecloud.asc
apt-key add "$SCRIPTS_PATH"/setup/pgroonga-debian.asc apt-key add "$SCRIPTS_PATH"/setup/pgroonga-debian.asc
cat >/etc/apt/sources.list.d/zulip.list <<EOF cat >/etc/apt/sources.list.d/zulip.list <<EOF