You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 line
461B

  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. v="$1"
  4. url="https://github.com/restic/restic/releases/download/v${v}/"
  5. file="restic_${v}_linux_amd64"
  6. pack="${file}.bz2"
  7. wget -O /tmp/${pack} "${url}${pack}"
  8. wget -O /tmp/resticsha256 "${url}SHA256SUMS"
  9. wget -O /tmp/resticsha256.asc "${url}SHA256SUMS.asc"
  10. (cd /tmp/; sha256sum --ignore-missing --check /tmp/resticsha256)
  11. (cd /tmp/; bunzip2 ${pack})
  12. mv /tmp/${file} /usr/local/bin/restic
  13. chmod +x /usr/local/bin/restic