#!/bin/bash if [ "$#" -ne 1 ]; then echo "$(tput setaf 1)No repo name specified$(tput sgr0)" echo "Usage: $0 " exit 1 else # Assign the directory to a variable REPO_PATH=/mnt/backups/$1 echo -e "Creating $(tput setaf 4)$REPO_PATH$(tput sgr0)" fi docker run -it --rm \ -v /mnt/backups:/mnt/backups \ restic/restic \ init --repo $REPO_PATH