This commit is contained in:
Marc Beninca 2025-02-18 21:16:35 +01:00
parent 3dacff41a5
commit 2a32fee946
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

15
sync.py
View file

@ -1,5 +1,6 @@
#! /usr/bin/env python3
from logging import log
import os
import subprocess
@ -60,7 +61,7 @@ def sync(root, pubnix, exclude=None):
"--partial",
"--progress",
"--verbose",
os.path.join(root, str()),
os.path.join(root, ""),
]
for item in exclude:
args.extend(["--exclude", os.path.join(str(), item)])
@ -71,14 +72,10 @@ def sync(root, pubnix, exclude=None):
def main():
root = os.path.dirname(os.path.realpath(__file__))
root = os.path.join(root, "out", "web")
dns_length = max([len(pubnix.dn) for pubnix in PUBNIXES])
for pubnix in PUBNIXES:
print()
print(pubnix)
# print(f'{pubnix.dn.rjust(dns_length)} → ', end=str(), flush=True)
sync(root, pubnix, exclude=["__pycache__", "pgp.asc"])
# print(pubnix.disk_free())
# print(pubnix.os())
for pn in PUBNIXES:
log()
log(pn)
sync(root, pn, exclude=["__pycache__", "pgp.asc"])
if __name__ == "__main__":