diff --git a/arguments.py b/arguments.py index 8ebc916..4e99419 100644 --- a/arguments.py +++ b/arguments.py @@ -74,10 +74,10 @@ compression applying to archive remote='https://repo.msys2.org', architectures=['x86_64'], - subsystems=['msys', 'mingw'], + subsystems=['msys', 'mingw64'], filesystem='fs', - compression='7z', + compression='zst', ) return vars(parser.parse_args()) diff --git a/remote.py b/remote.py index 35236b1..eeecb37 100644 --- a/remote.py +++ b/remote.py @@ -9,8 +9,10 @@ ARCHIVE = '.tar.xz' ARCHITECTURES = ['x86_64', 'i686'] CHARSET = 'u8' DISTRIBUTION = 'distrib' +FILES = '.files' +MINGW = 'mingw' SIGNATURE = '.sig' -SUBSYSTEMS = ['msys', 'mingw'] +SUBSYSTEMS = ['msys', 'mingw64'] class Remote: @@ -21,7 +23,8 @@ class Remote: self.load() def load(self): - d = {} + a = {} + c = {} for architecture in self.architectures: url = os.path.join(self.location, DISTRIBUTION, architecture) html = requests.get(url).content.decode(CHARSET) @@ -29,8 +32,18 @@ class Remote: archives = [link for link in links if link.endswith(ARCHIVE)] archive = archives[-1] - d[architecture] = archive - self.archives = d + a[architecture] = archive + # + for subsystem in self.subsystems: + location = [self.location] + if subsystem != SUBSYSTEMS[0]: + location.append(MINGW) + location = os.path.join(*location, subsystem, architecture, + f'{subsystem}{FILES}') + binary = requests.get(url).content + c[architecture] = binary + self.archives = a + self.catalogs = c def __str__(self): lines = [f'Location: {self.location}',