echo BACKMEUPSCOTTY: Syncing $1 to $REMOTE_HOST:$REMOTE_BASE/$2 @$timestamp
+ if [ ! -d "$1" ]; then
+ echo BACKMEUPSCOTTY: Source dir $1 does not exist. Not syncing! >&2
+ return 1
+ fi
+
+ if [ $(ls -A "$1" | wc -l) -eq 0 ]; then
+ echo BACKMEUPSCOTTY: Source dir $1 is empty. Not syncing! >&2
+ return 1
+ fi
+
dir_current=$REMOTE_BASE/$2/current
dir_incomplete=$REMOTE_BASE/$2/incomplete
dir_timestamped=$REMOTE_BASE/$2/$timestamp-$(date -d @$timestamp +%Y%m%d%H%M%S)