#! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash rsync

shopt -s extglob

sync() {
    echo "Syncing $1"
    rsync -avzr --info=progress2 --info=name0 \
        --remove-source-files \
        -e ssh /srv/miniserver/"$1"/ /srv/server/"$1"
}

sync pool/scrapping/JawZ
sync pool/glue

echo "syncing download files"
jawz_config=/home/jawz/.config/jawz/
rsync -avz -r --info=progress2 --info=name0 --delete \
    -e ssh miniserver:"$jawz_config" "$jawz_config"

echo "Donion rings nwn!"
