19 lines
338 B
Bash
Executable File
19 lines
338 B
Bash
Executable File
#!/usr/bin/env zsh
|
|
|
|
# TODO: offer to clear camera storage
|
|
|
|
srcdir=$CAM_SRC
|
|
bkpdir=$CAM_BKP
|
|
|
|
if [ "$#" -eq 2 ]; then
|
|
srcdir=$1
|
|
bkpdir=$2
|
|
fi
|
|
|
|
[ ! -d $srcdir ] && echo "$srcdir not found" && exit 1
|
|
[ ! -d $bkpdir ] && echo "$bkpdir not found" && exit 1
|
|
|
|
rsync --update --recursive --human-readable --progress $srcdir $bkpdir
|
|
|
|
exit 0
|