docs: install: apt snippet: idempotent, bash compat, multiarch compat

Co-authored-by: Janis Streib <me@janis-streib.de>
Co-authored-by: Christian Schwarz <me@cschwarz.com>
This commit is contained in:
Christian Schwarz 2019-10-21 11:59:59 +02:00
parent dc39c819a3
commit fcf16a163a

View File

@ -62,12 +62,12 @@ The fingerprint of the signing key for Debian / Ubuntu packages is ``E101 418F D
It is available at ``https://zrepl.cschwarz.com/apt/apt-key.asc``. It is available at ``https://zrepl.cschwarz.com/apt/apt-key.asc``.
:: ::
apt update && apt install curl gnupg lsb-release; \
CODENAME="$(lsb_release -i -s | tr '[:upper:]' '[:lower:]') $(lsb_release -c -s | tr '[:upper:]' '[:lower:]')" ARCH="$(dpkg --print-architecture)"; \
echo -n "Please confirm Distro and Codename by pressing ENTER: $CODENAME" CODENAME="$(lsb_release -i -s | tr '[:upper:]' '[:lower:]') $(lsb_release -c -s | tr '[:upper:]' '[:lower:]')"; \
read -n _unused_ echo "Using Distro and Codename: $CODENAME"; \
curl https://zrepl.cschwarz.com/apt/apt-key.asc | apt-key add - (curl https://zrepl.cschwarz.com/apt/apt-key.asc | apt-key add -) && \
echo "deb https://zrepl.cschwarz.com/apt/$CODENAME main" >> /etc/apt/sources.list (echo "deb [arch=$ARCH] https://zrepl.cschwarz.com/apt/$CODENAME main" > /etc/apt/sources.list.d/zrepl.list) && \
apt update apt update
Note that until zrepl reaches 1.0, all APT repositories will be updated to the latest zrepl release immediately. Note that until zrepl reaches 1.0, all APT repositories will be updated to the latest zrepl release immediately.