aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cacharle-sync7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/cacharle-sync b/bin/cacharle-sync
index 9a73f50..2f1e33b 100755
--- a/bin/cacharle-sync
+++ b/bin/cacharle-sync
@@ -1,12 +1,13 @@
#!/usr/bin/env sh
usage() {
- echo "Usage: $0 push/pull [rsync args]"
+ echo "Usage: $0 push/pull [rsync args...]"
}
-[ -z "$1" ] || [ $# -gt 2 ] && usage && exit 1
+[ -z "$1" ] && usage && exit 1
-RSYNC_CMD="rsync -avh --progress --compress $2"
+RSYNC_ARGS="$(echo "$*" | cut -d ' ' -f 2-)"
+RSYNC_CMD="rsync -avh --progress --compress $RSYNC_ARGS"
REMOTE_USER=charles
REMOTE_HOST=cacharle.xyz