mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-07-01 15:35:45 +00:00
fix last commit
This commit is contained in:
parent
52c0154928
commit
e12d50657d
@ -99,7 +99,6 @@ def apt_mirror(base_url: str, dist: str, repo: str, arch: str, dest_base_dir: Pa
|
|||||||
|
|
||||||
# download Release files
|
# download Release files
|
||||||
dist_dir,dist_tmp_dir = mkdir_with_dot_tmp(dest_base_dir / "dists" / dist)
|
dist_dir,dist_tmp_dir = mkdir_with_dot_tmp(dest_base_dir / "dists" / dist)
|
||||||
check_and_download(f"{base_url}/dists/{dist}/Contents-{arch}.gz",dist_tmp_dir / f"Contents-{arch}.gz")
|
|
||||||
check_and_download(f"{base_url}/dists/{dist}/InRelease",dist_tmp_dir / "InRelease")
|
check_and_download(f"{base_url}/dists/{dist}/InRelease",dist_tmp_dir / "InRelease")
|
||||||
if check_and_download(f"{base_url}/dists/{dist}/Release",dist_tmp_dir / "Release") != 0:
|
if check_and_download(f"{base_url}/dists/{dist}/Release",dist_tmp_dir / "Release") != 0:
|
||||||
print("Invalid Repository")
|
print("Invalid Repository")
|
||||||
@ -121,7 +120,8 @@ def apt_mirror(base_url: str, dist: str, repo: str, arch: str, dest_base_dir: Pa
|
|||||||
break
|
break
|
||||||
checksum, filesize, filename = tuple(fields)
|
checksum, filesize, filename = tuple(fields)
|
||||||
if not (filename.startswith(f"{repo}/binary-{arch}") or \
|
if not (filename.startswith(f"{repo}/binary-{arch}") or \
|
||||||
filename.startswith(f"{repo}/Contents")):
|
filename.startswith(f"{repo}/Contents-{arch}") or \
|
||||||
|
filename.startswith(f"Contents-{arch}") ):
|
||||||
print(f"Ignore the file {filename}")
|
print(f"Ignore the file {filename}")
|
||||||
continue
|
continue
|
||||||
pkgidx_file = dist_tmp_dir / filename
|
pkgidx_file = dist_tmp_dir / filename
|
||||||
|
Loading…
x
Reference in New Issue
Block a user