summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Kocialkowski2023-11-03 19:29:58 +0100
committerPaul Kocialkowski2023-11-03 19:29:58 +0100
commitc154831c42d734a14074a1d29c4534b4325b0a99 (patch)
tree07b10aec36cb019c1d5d79021f054fefd9b48b96
parent610a93a88e559a8085cbb17f8402832a339b35a4 (diff)
data-sync: Allow an entry-specific base
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rwxr-xr-xdata-sync7
1 files changed, 6 insertions, 1 deletions
diff --git a/data-sync b/data-sync
index 8773a53..c8014c1 100755
--- a/data-sync
+++ b/data-sync
@@ -129,7 +129,12 @@ class data_sync():
def sync_data_entry(self, source, sink, sync_host, entry):
print("\nSync "+text_green+text_bold+entry["path"]+text_reset+" from "+text_cyan+source["name"]+text_reset+" to "+text_cyan+sink["name"]+text_reset+" started")
- source_path = os.path.join(source["base"], entry["path"])
+ if "base" in entry:
+ base = entry["base"]
+ else:
+ base = source["base"]
+
+ source_path = os.path.join(base, entry["path"])
sink_path = os.path.join(sink["base"], sync_host["path"]) + "/"
excludes_path = self.excludes_prepare(entry)