#!/bin/bash

# Exit script if command fails
# -u stops the script on unset variables
# -e stops the script on errors
# -o pipefail stops the script if a pipe fails
set -e

REPOSITORY=https://raw.githubusercontent.com/mint-system/ansible-playbooks

SCRIPT="docker-volume-backup"
echo "Install $SCRIPT script ..."
sudo curl -L "$REPOSITORY/master/roles/docker-volume/files/$SCRIPT" -o "/usr/local/bin/$SCRIPT"
sudo chmod +x "/usr/local/bin/$SCRIPT"

SCRIPT="docker-volume-restore"
echo "Install $SCRIPT script ..."
sudo curl -L "$REPOSITORY/master/roles/docker-volume/files/$SCRIPT" -o "/usr/local/bin/$SCRIPT"
sudo chmod +x "/usr/local/bin/$SCRIPT"