From c1c69e3ea783744cb3e8425ecd8d2a0460e5b62a Mon Sep 17 00:00:00 2001 From: Melon Bread Date: Sat, 20 Oct 2018 23:17:47 -0400 Subject: [PATCH] Split PLATFORM to PLATFORM & ARCHITECTURE :scissors: --- RetroUFO.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/RetroUFO.py b/RetroUFO.py index 139f612..4ffc2a3 100644 --- a/RetroUFO.py +++ b/RetroUFO.py @@ -15,13 +15,16 @@ from urllib.request import urlretrieve URL = 'https://buildbot.libretro.com/nightly' -PLATFORM = 'linux/x86_64' +PLATFORM = 'linux' + +ARCHITECTURE = 'x86_64' CORE_LOCATION = '~/.config/retroarch/cores/' def main(args): """ Where the magic happens """ + download_cores() extract_cores() if not args.keep: @@ -38,7 +41,7 @@ def download_cores(): os.makedirs("cores") # 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') print('Obtained core index!') @@ -53,7 +56,7 @@ def download_cores(): # Downloads each core from the list for core in cores: - urlretrieve('{}/{}/latest/{}'.format(URL, PLATFORM, core), + urlretrieve('{}/{}/{}/latest/{}'.format(URL, PLATFORM, ARCHITECTURE, core), 'cores/{}'.format(core)) print('Downloaded {} ...'.format(core)) @@ -83,7 +86,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('-k', '--keep', action='store_true', - help='Keeps downloaded core archives') + help='Keeps downloaded core archives') args = parser.parse_args() main(args)