From fc859671c8a551ccf273e99ed4e4b7814ac9ee58 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 10 Nov 2012 19:35:02 +0000 Subject: publish: add a -r option to add --relative rsync option Signed-off-by: Peter Palfrader git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@558 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede --- publish | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/publish b/publish index f901640..e49fb6a 100755 --- a/publish +++ b/publish @@ -75,6 +75,8 @@ OPTIONS: -h Show this message. -n no-do. Just print what would have been done. -q Produce a QR code. + -r Add --relative option to rsync so that path names of the given + files are preserved at the remote host. -x Publish the contents of the xclipboard. EOF } @@ -114,7 +116,7 @@ do_screenshot=0 make_qrcode=0 add_default_cs=0 -while getopts "hnq8HSxs:" OPTION +while getopts "rhnq8HSxs:" OPTION do case $OPTION in h) @@ -148,6 +150,9 @@ do s) name_stdin="$OPTARG" ;; + r) + rsync_args="${rsync_args} --relative" + ;; *) usage >&2 exit 1 -- cgit v1.2.3