#!/usr/bin/env zsh set -x set -e set -o nullglob YYYYMMDD="$(date "+%Y-%m-%d")" RSYNCOPTS="-ah --no-inc-recursive --info=progress2" RDST="root@las1stor1:/srv/pool.2024.04/berlin.sneak.fs.video" function amLocalToVideoStore() { ifconfig | grep 10.100.205 | wc -l } function copyVideosToVideoStore() { rsync \ -ah --no-inc-recursive --info=progress2 \ ./ "$RDST"/ && \ rsync \ -ah --no-inc-recursive --info=progress2 \ --remove-source-files \ ./ "$RDST"/ && \ rm -rfv ./ && \ } function main() { if [[ $(amLocalToLAS1) -gt 0 ]]; then copyVideosToLAS1 fi } main