|
|
|
@@ -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 |
|
|
|
|
|
|
|
|