Compare commits

..

No commits in common. "2e16c5e914b7f48c7bc5d6ad8b858d4cc67d5326" and "85147a4fd6d956e913e4d6e9091c039121f6c2dc" have entirely different histories.

2 changed files with 7 additions and 11 deletions

View file

@ -58,8 +58,9 @@ let
mosh
openssh
sshfs-fuse
sshuttle
cryfs
openssh
sshuttle
thefuck
gnupg
unar

View file

@ -29,7 +29,7 @@
JUMPHOST="$DEFAULT_JUMPHOST"
;;
?)
echo "rsyncrepo [-J] [-j <jumphost>] <directory> <hostname> [target dir name]"
echo "rsyncrepo [-J] [-j <jumphost>] <directory> <hostname>"
return 1
;;
esac
@ -40,7 +40,6 @@
RR_FROM="$1"
RR_TO="$2"
RR_TARGET="$3"
}
_do_rsync() {
@ -58,12 +57,8 @@
echo "$OPTI"
done
# If no $3 is specified, we sync /path/to/dir/ to hostname:dir
if [ -z "$3" ]; then
RR_DEST="''${2}:$(basename $(realpath "''${1}"))"
else
RR_DEST="''${2}:''${3}"
fi
# we always sync /path/to/dir/ to hostname:dir
RR_DEST="''${2}:$(basename $(realpath "''${1}"))"
echo "Syncing ''${1} to ''${RR_DEST}"
@ -74,11 +69,11 @@
rsyncrepo() {
_parse_rsync_args "$@"
# inherits parsed arguments through variables
_do_rsync "$RR_FROM" "$RR_TO" "$RR_TARGET"
_do_rsync "$RR_FROM" "$RR_TO"
}
rsynchydra() {
_parse_rsync_args "$@"
_do_rsync "$RR_FROM" "hydra01" "$RR_TARGET"
_do_rsync "$RR_FROM" "hydra01"
}
''