Print a blank line after sync completion

Former-commit-id: 1eaa21a210aff947eddc4c35a2c59542a33b4282
Former-commit-id: 0602f43ae43d0ac931bffac99d5538c8f90e13a1
This commit is contained in:
2023-06-20 14:07:57 -04:00
parent 3f86508f9c
commit 2813387577
+7 -1
View File
@@ -150,25 +150,31 @@ def run_profile(_profile_dir, _silent):
_index_local = sort_titles_mods(_remote_titles_mods, get_local_data(_user_data[3], 'client'))
_index_remote = sort_titles_mods(_index_local, _remote_titles_mods)
# sync new and updated files
_i = -1
_i, _synced = -1, False
for _title in _index_local[0]:
_i += 1
if _title in _index_remote[0]:
# compare mod times and sync
if int(_index_local[1][_i]) > int(_index_remote[1][_i]):
_synced = True
print(f"\u001b[38;5;4m{_title[:-4]}\u001b[0m is newer locally, uploading...")
run(('scp', '-pqs', '-P', _user_data[2], '-i', _user_data[5], _user_data[3] + _title,
f"{_user_data[0]}@[{_user_data[1]}]:{_user_data[4]}{_title}"))
elif int(_index_local[1][_i]) < int(_index_remote[1][_i]):
_synced = True
print(f"\u001b[38;5;2m{_title[:-4]}\u001b[0m is newer remotely, downloading...")
run(('scp', '-pqs', '-P', _user_data[2], '-i', _user_data[5],
f"{_user_data[0]}@[{_user_data[1]}]:{_user_data[4]}{_title}", f"{_user_data[3]}{_title}"))
else:
_synced = True
print(f"\u001b[38;5;4m{_title[:-4]}\u001b[0m is not on remote server, uploading...")
run(('scp', '-pqs', '-P', _user_data[2], '-i', _user_data[5], _user_data[3] + _title,
f"{_user_data[0]}@[{_user_data[1]}]:{_user_data[4]}{_title}"))
for _title in _index_remote[0]:
if _title not in _index_local[0]:
_synced = True
print(f"\u001b[38;5;2m{_title[:-4]}\u001b[0m is not in local directory, downloading...")
run(('scp', '-pqs', '-P', _user_data[2], '-i', _user_data[5],
f"{_user_data[0]}@[{_user_data[1]}]:{_user_data[4]}{_title}", f"{_user_data[3]}{_title}"))
if _synced:
print()