restic updater: Create archive dir on the fly

This commit is contained in:
deajan 2024-12-10 21:13:43 +01:00
parent 60de1d8353
commit 12ac6da81b

View file

@ -77,6 +77,8 @@ def download_restic_binaries(arch: str = "amd64"):
# Assume we have a zip or tar.gz
shutil.unpack_archive(full_path, dest_dir)
try:
if not dest_dir.joinpath("ARCHIVES").is_dir():
os.makedirs(dest_dir.joinpath("ARCHIVES"))
shutil.move(full_path, dest_dir.joinpath("ARCHIVES").joinpath(filename))
except OSError:
print(