summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2021-10-05 11:10:57 -0500
committerTimmy Keller <tjk@tjkeller.xyz>2021-10-05 11:10:57 -0500
commit551e1c638a6a4ff2130b3c374774f6006b28467d (patch)
tree518d8313f7f6fc7917446a3d8237543bb88b7dda
parent0869639569a9d0f4f21111695f219282ebf4b394 (diff)
downloadscripts-551e1c638a6a4ff2130b3c374774f6006b28467d.tar.xz
scripts-551e1c638a6a4ff2130b3c374774f6006b28467d.zip
delete while sinking down
-rwxr-xr-xsync/sink2
1 files changed, 1 insertions, 1 deletions
diff --git a/sync/sink b/sync/sink
index 188083d..04c95e6 100755
--- a/sync/sink
+++ b/sync/sink
@@ -26,7 +26,7 @@ printerror() { echo -n "$BOLD$RED[An error occured while syncing $SYNCNAME]\n"
sync() {
[ $oper = "up" ] && SYNCNAME="$1$2 to $rdest$2" || SYNCNAME="$rdest$2 to $1$2"
printsyncmsg
- (if [ $oper = "up" ]; then rsync $ropts $1$2 $rdest; else rsync $ropts $rdest$2 $1; fi) \
+ (if [ $oper = "up" ]; then rsync $ropts $1$2 $rdest; else rsync $ropts --delete $rdest$2 $1; fi) \
&& printsuccess || printerror
}