restic version from pillar
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
#!/bin/bash
|
||||
{% set arch = 'arm' salt.grains.get(cpuarch).startswith('arm') else 'amd64' %}
|
||||
{% set restic_version = salt.pillar.get("restic:version") %}
|
||||
|
||||
if test -z "$RESTIC_VERSION"; then
|
||||
echo "RESTIC_VERSION is not defined"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
URL="https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_linux_{{ arch }}.bz2"
|
||||
URL="https://github.com/restic/restic/releases/download/v{{ restic_version }}/restic_{{ restic_version }}_linux_{{ arch }}.bz2"
|
||||
|
||||
wget --quiet "${URL}" -O - | bzip2 -cd > /bin/restic.tmp
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user