automate/020_riotIM-nightly.sh

25 lines
732 B
Bash
Executable File

#!/usr/bin/env basho
URL=riot.im
RELEASE=buster
sudo sh -c "echo 'deb https://${URL}/packages/debian/ ${RELEASE} main' > /etc/apt/sources.list-available/matrix-riot-im.list"
sudo ln -s /etc/apt/sources.list-available/matrix-riot-im.list /etc/apt/sources.list.d/matrix-riot-im.list
# Add the public key:
curl -L https://riot.im/packages/debian/repo-key.asc | sudo apt-key add -
# Bypass apt-proxy for riotIM packages
if [ -d /etc/apt/apt.conf.d/02proxy ]; then
if [ ! -z $(grep ${URL}) ]; then
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >> /etc/apt/apt.conf.d/02proxy
fi
else
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >> /etc/apt/apt.conf.d/02proxy
fi
sudo apt update && apt install -y riot-nightly