aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydractl/sync-media8
1 files changed, 7 insertions, 1 deletions
diff --git a/share/hydractl/sync-media b/share/hydractl/sync-media
index d463e44..1ce9516 100755
--- a/share/hydractl/sync-media
+++ b/share/hydractl/sync-media
@@ -274,7 +274,13 @@ if [ ! -z "$DRIVE" ] && [ -d "$VOLUME/$MEDIA" ]; then
if [ "$method" == "unison" ];
unison $CACHE/$folder $VOLUME/$MEDIA/$folder -auto -logfile /dev/null
- elif [ "$method" == "rsync" ]; then
+ elif [ "$method" == "rsync-to-media-volume" ]; then
+ echo "Syncing $CACHE/$folder into $VOLUME/$MEDIA/$folder..."
+ rsync -av --delete --exclude=.sync-media $CACHE/$folder/ $VOLUME/$MEDIA/$folder/
+ elif [ "$method" == "rsync-from-media-volume" ]; then
+ echo "Syncing $VOLUME/$MEDIA/$folder into $CACHE/$folder..."
+ rsync -av --delete --exclude=.sync-media $VOLUME/$MEDIA/$folder/ $CACHE/$folder/
+ elif [ "$method" == "rsync-if-empty-dest" ]; then
# Ensure both endpoint folders exist
mkdir -p $CACHE/folder
mkdir -p $VOLUME/$MEDIA/$folder