[Login]

scripts/sync

#!/bin/bash

# Copies the currnet location under ~/ from my desktop to the host executing this script.
# Assumes it is being executed from under ~/ on the destination host.
# Both the remote and local paths should have the same relative paths starting from ~

HOST=something
PATH="~/$(relpath ~ $(pwd))/"

CMD="/usr/bin/rsync -a --progress --stats --delete-after --exclude target/ --exclude .recommenders --exclude .metadata -e /usr/bin/ssh rroller@$HOST:$PATH ."
echo "Running $CMD"
$CMD
#!/bin/bash

# Copies the currnet location relative to ~/ from the host executing this script to the same location under ~/ on my desktop.
# Assumes it is being executed from under ~/.

HOST=something
PATH="~/$(relpath ~ $(pwd))/"

CMD="/usr/bin/rsync -a --stats --progress --delete-after --exclude target/ --exclude .recommenders --exclude .metadata -e /usr/bin/ssh . rroller@$HOST:$PATH "
echo "Running $CMD"
$CMD