Kevin Veen-Birkenbach 2023-06-20 09:52:10 +02:00
parent bac40d54c9
commit 9bd600e6ed

View File

@ -40,10 +40,11 @@ def main():
print("Starting synchronization...") print("Starting synchronization...")
try: try:
rsync_command = [ rsync_command = [
"rsync", "-abP", "--delete", "--delete-excluded", "rsync", "-abP", "--delete", "--delete-excluded"
"--link-dest=" + previous_version_path,
source_path, current_version_path
] ]
if previous_version_path is not None:
rsync_command.append("--link-dest=" + previous_version_path)
rsync_command.extend([source_path, current_version_path])
rsync_output = subprocess.check_output(rsync_command, stderr=subprocess.STDOUT, text=True) rsync_output = subprocess.check_output(rsync_command, stderr=subprocess.STDOUT, text=True)
print(rsync_output) print(rsync_output)