X-Git-Url: https://git.treefish.org/~alex/backmeupscotty.git/blobdiff_plain/2f8f015134f3b5da18ac0fc9e4296d049e542709..d34265295e889746affba716d96b4b8f50af362e:/backmeupscotty diff --git a/backmeupscotty b/backmeupscotty index 965da29..1b7fa19 100644 --- a/backmeupscotty +++ b/backmeupscotty @@ -32,6 +32,11 @@ function scottysync { rsync_exclude=$(eval echo --exclude={$3} | tr -d {}) fi + if (ssh $REMOTE_HOST '[ ! -d '$REMOTE_BASE/$2' ]'); then + echo BACKMEUPSCOTTY: Creating destination directory $REMOTE_HOST:$REMOTE_BASE/$2 + ssh $REMOTE_HOST "mkdir $REMOTE_BASE/$2" + fi + echo BACKMEUPSCOTTY: Starting rsync rsync -e ssh \ -v -aHAX --numeric-ids --delete --delete-excluded \