#!/bin/bash shopt -s dotglob if [[ "$1" == "save" ]]; then rsync -at --delete /home/besfamilnij/.chrome/ /home/besfamilnij/.chrome-backup elif [[ "$1" == "restore" ]]; then rsync -at --delete /home/besfamilnij/.chrome-backup/ /home/besfamilnij/.chrome fi