mirror of
https://github.com/Melon-Bread/RetroUFO
synced 2025-02-17 19:13:02 -05:00
Split PLATFORM to PLATFORM & ARCHITECTURE ✂️
This commit is contained in:
parent
f2346ce5f0
commit
c1c69e3ea7
11
RetroUFO.py
11
RetroUFO.py
@ -15,13 +15,16 @@ from urllib.request import urlretrieve
|
|||||||
|
|
||||||
URL = 'https://buildbot.libretro.com/nightly'
|
URL = 'https://buildbot.libretro.com/nightly'
|
||||||
|
|
||||||
PLATFORM = 'linux/x86_64'
|
PLATFORM = 'linux'
|
||||||
|
|
||||||
|
ARCHITECTURE = 'x86_64'
|
||||||
|
|
||||||
CORE_LOCATION = '~/.config/retroarch/cores/'
|
CORE_LOCATION = '~/.config/retroarch/cores/'
|
||||||
|
|
||||||
|
|
||||||
def main(args):
|
def main(args):
|
||||||
""" Where the magic happens """
|
""" Where the magic happens """
|
||||||
|
|
||||||
download_cores()
|
download_cores()
|
||||||
extract_cores()
|
extract_cores()
|
||||||
if not args.keep:
|
if not args.keep:
|
||||||
@ -38,7 +41,7 @@ def download_cores():
|
|||||||
os.makedirs("cores")
|
os.makedirs("cores")
|
||||||
|
|
||||||
# Downloads a list of all the cores available
|
# Downloads a list of all the cores available
|
||||||
urlretrieve('{}/{}/latest/.index-extended'.format(URL, PLATFORM),
|
urlretrieve('{}/{}/{}/latest/.index-extended'.format(URL, PLATFORM, ARCHITECTURE),
|
||||||
'cores/index')
|
'cores/index')
|
||||||
print('Obtained core index!')
|
print('Obtained core index!')
|
||||||
|
|
||||||
@ -53,7 +56,7 @@ def download_cores():
|
|||||||
|
|
||||||
# Downloads each core from the list
|
# Downloads each core from the list
|
||||||
for core in cores:
|
for core in cores:
|
||||||
urlretrieve('{}/{}/latest/{}'.format(URL, PLATFORM, core),
|
urlretrieve('{}/{}/{}/latest/{}'.format(URL, PLATFORM, ARCHITECTURE, core),
|
||||||
'cores/{}'.format(core))
|
'cores/{}'.format(core))
|
||||||
print('Downloaded {} ...'.format(core))
|
print('Downloaded {} ...'.format(core))
|
||||||
|
|
||||||
@ -83,7 +86,7 @@ if __name__ == "__main__":
|
|||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
|
|
||||||
parser.add_argument('-k', '--keep', action='store_true',
|
parser.add_argument('-k', '--keep', action='store_true',
|
||||||
help='Keeps downloaded core archives')
|
help='Keeps downloaded core archives')
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
main(args)
|
main(args)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user