add zrepl install script
This commit is contained in:
parent
f73c4fc605
commit
94e97d8f09
1 changed files with 21 additions and 0 deletions
21
tools/install-zrepl.sh
Executable file
21
tools/install-zrepl.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
||||||
|
set -ex
|
||||||
|
zrepl_apt_key_url=https://zrepl.cschwarz.com/apt/apt-key.asc
|
||||||
|
zrepl_apt_key_dst=/usr/share/keyrings/zrepl.gpg
|
||||||
|
zrepl_apt_repo_file=/etc/apt/sources.list.d/zrepl.list
|
||||||
|
|
||||||
|
# Install dependencies for subsequent commands
|
||||||
|
sudo apt update && sudo apt install curl gnupg lsb-release
|
||||||
|
|
||||||
|
# Deploy the zrepl apt key.
|
||||||
|
curl -fsSL "$zrepl_apt_key_url" | tee | gpg --dearmor | sudo tee "$zrepl_apt_key_dst" > /dev/null
|
||||||
|
|
||||||
|
# Add the zrepl apt repo.
|
||||||
|
ARCH="$(dpkg --print-architecture)"
|
||||||
|
CODENAME="$(lsb_release -i -s | tr '[:upper:]' '[:lower:]') $(lsb_release -c -s | tr '[:upper:]' '[:lower:]')"
|
||||||
|
echo "Using Distro and Codename: $CODENAME"
|
||||||
|
echo "deb [arch=$ARCH signed-by=$zrepl_apt_key_dst] https://zrepl.cschwarz.com/apt/$CODENAME main" | sudo tee /etc/apt/sources.list.d/zrepl.list
|
||||||
|
|
||||||
|
# Update apt repos.
|
||||||
|
sudo apt update
|
||||||
|
# Install zrepl
|
||||||
|
sudo apt install zrepl
|
||||||
Loading…
Add table
Add a link
Reference in a new issue