summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2012-11-10 19:35:02 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2012-11-10 19:35:02 +0000
commitfc859671c8a551ccf273e99ed4e4b7814ac9ee58 (patch)
treee30efcc56c3fdbc1ea27638d08360168e866b86d
parentef97fd43c122eacbf61a14a6bcc90ca928c24dc5 (diff)
publish: add a -r option to add --relative rsync option
Signed-off-by: Peter Palfrader <peter@palfrader.org> git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@558 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-xpublish7
1 files changed, 6 insertions, 1 deletions
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