Selaa lähdekoodia

Add restic install script

master
Wouter Horlings 4 vuotta sitten
vanhempi
commit
39a5d5c58b
1 muutettua tiedostoa jossa 18 lisäystä ja 0 poistoa
  1. +18
    -0
      restic-install.sh

+ 18
- 0
restic-install.sh Näytä tiedosto

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail

v="$1"
url="https://github.com/restic/restic/releases/download/v${v}/"
file="restic_${v}_linux_amd64"
pack="${file}.bz2"

wget -O /tmp/${pack} "${url}${pack}"
wget -O /tmp/resticsha256 "${url}SHA256SUMS"
wget -O /tmp/resticsha256.asc "${url}SHA256SUMS.asc"

(cd /tmp/; sha256sum --ignore-missing --check /tmp/resticsha256)
(cd /tmp/; bunzip2 ${pack})
mv /tmp/${file} /usr/local/bin/restic
chmod +x /usr/local/bin/restic



Loading…
Peruuta
Tallenna