您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

19 行
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