mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-13 00:16:21 +08:00
Add darwin upgrade support
This commit is contained in:
parent
0dc9409f55
commit
0fdb267275
1 changed files with 5 additions and 1 deletions
|
@ -6,7 +6,7 @@ __intname__ = "npbackup.restic_update"
|
|||
__author__ = "Orsiris de Jong"
|
||||
__copyright__ = "Copyright (C) 2024-2025 NetInvent"
|
||||
__license__ = "BSD-3-Clause"
|
||||
__build__ = "2025040801"
|
||||
__build__ = "2025062901"
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
@ -49,6 +49,9 @@ def download_restic_binaries(arch: str = "amd64") -> bool:
|
|||
fname = f"_windows_{arch}"
|
||||
suffix = ".exe"
|
||||
arch_suffix = ".zip"
|
||||
elif sys.platform.lower() == "darwin":
|
||||
fname = f"_darwin_{arch}"
|
||||
arch_suffix = ".bz2"
|
||||
else:
|
||||
fname = f"_linux_{arch}"
|
||||
suffix = ""
|
||||
|
@ -58,6 +61,7 @@ def download_restic_binaries(arch: str = "amd64") -> bool:
|
|||
os.makedirs(dest_dir.joinpath("ARCHIVES"))
|
||||
|
||||
dest_file = dest_dir.joinpath("restic_" + current_version + fname + suffix)
|
||||
print(f"Projected dest file is {dest_file}")
|
||||
|
||||
if dest_file.is_file():
|
||||
print(f"RESTIC SOURCE ALREADY PRESENT. NOT DOWNLOADING {dest_file}")
|
||||
|
|
Loading…
Add table
Reference in a new issue