aboutsummaryrefslogtreecommitdiff
path: root/ebuild/syncers/dorsync.in
diff options
context:
space:
mode:
Diffstat (limited to 'ebuild/syncers/dorsync.in')
-rw-r--r--ebuild/syncers/dorsync.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/ebuild/syncers/dorsync.in b/ebuild/syncers/dorsync.in
new file mode 100644
index 0000000..f0ee64d
--- /dev/null
+++ b/ebuild/syncers/dorsync.in
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+LOCAL="$1"
+REMOTE="$2"
+
+[[ "${REMOTE}" == file* ]] && REMOTE="${REMOTE:7}"
+
+if [[ -n "${PALUDIS_SYNC_EXCLUDE_FROM}" ]]; then
+ EXCLUDE=( --exclude-from "${PALUDIS_SYNC_EXCLUDE_FROM}" )
+else
+ EXCLUDE=( )
+fi
+
+rsync --recursive --links --safe-links --perms --times --compress --force \
+ --whole-file --delete --delete-after --stats --timeout=180 \
+ --exclude=/distfiles --exclude=/packages --exclude=/local \
+ --exclude=/.cache --progress "${EXCLUDE[@]}" "${REMOTE}" "${LOCAL}/"
+