binary
This commit is contained in:
parent
abb94102ba
commit
a2b3951e63
2 changed files with 19 additions and 6 deletions
|
@ -74,10 +74,10 @@ compression applying to archive
|
||||||
|
|
||||||
remote='https://repo.msys2.org',
|
remote='https://repo.msys2.org',
|
||||||
architectures=['x86_64'],
|
architectures=['x86_64'],
|
||||||
subsystems=['msys', 'mingw'],
|
subsystems=['msys', 'mingw64'],
|
||||||
|
|
||||||
filesystem='fs',
|
filesystem='fs',
|
||||||
compression='7z',
|
compression='zst',
|
||||||
)
|
)
|
||||||
|
|
||||||
return vars(parser.parse_args())
|
return vars(parser.parse_args())
|
||||||
|
|
21
remote.py
21
remote.py
|
@ -9,8 +9,10 @@ ARCHIVE = '.tar.xz'
|
||||||
ARCHITECTURES = ['x86_64', 'i686']
|
ARCHITECTURES = ['x86_64', 'i686']
|
||||||
CHARSET = 'u8'
|
CHARSET = 'u8'
|
||||||
DISTRIBUTION = 'distrib'
|
DISTRIBUTION = 'distrib'
|
||||||
|
FILES = '.files'
|
||||||
|
MINGW = 'mingw'
|
||||||
SIGNATURE = '.sig'
|
SIGNATURE = '.sig'
|
||||||
SUBSYSTEMS = ['msys', 'mingw']
|
SUBSYSTEMS = ['msys', 'mingw64']
|
||||||
|
|
||||||
|
|
||||||
class Remote:
|
class Remote:
|
||||||
|
@ -21,7 +23,8 @@ class Remote:
|
||||||
self.load()
|
self.load()
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
d = {}
|
a = {}
|
||||||
|
c = {}
|
||||||
for architecture in self.architectures:
|
for architecture in self.architectures:
|
||||||
url = os.path.join(self.location, DISTRIBUTION, architecture)
|
url = os.path.join(self.location, DISTRIBUTION, architecture)
|
||||||
html = requests.get(url).content.decode(CHARSET)
|
html = requests.get(url).content.decode(CHARSET)
|
||||||
|
@ -29,8 +32,18 @@ class Remote:
|
||||||
archives = [link for link in links
|
archives = [link for link in links
|
||||||
if link.endswith(ARCHIVE)]
|
if link.endswith(ARCHIVE)]
|
||||||
archive = archives[-1]
|
archive = archives[-1]
|
||||||
d[architecture] = archive
|
a[architecture] = archive
|
||||||
self.archives = d
|
#
|
||||||
|
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):
|
def __str__(self):
|
||||||
lines = [f'Location: {self.location}',
|
lines = [f'Location: {self.location}',
|
||||||
|
|
Loading…
Reference in a new issue