diff --git a/.gitignore b/.gitignore index 459d696..fe21c97 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ dist/ build/ /xflux /installed.txt +/xflux11 +/xflux12 diff --git a/download-xflux.py b/download-xflux.py old mode 100644 new mode 100755 index acc5674..5796b76 --- a/download-xflux.py +++ b/download-xflux.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + from sys import maxsize import subprocess @@ -5,15 +7,20 @@ # you probably want to change that too. def download_xflux(): # Determines which is the appropriate executable for 32-bit - if maxsize == 2147483647: + if maxsize == 2**31 - 1: print("Downloading 32-bit xflux ...") - url = "https://justgetflux.com/linux/xflux-pre.tgz" - elif maxsize == 9223372036854775807: + urls = ["https://justgetflux.com/linux/xflux-pre.tgz"] + elif maxsize == 2**63 - 1: print("Downloading 64-bit xflux ...") - url = "https://justgetflux.com/linux/xflux64.tgz" - tarchive = "/tmp/xflux.tgz" - subprocess.call(['wget', url, '-O', tarchive]) - subprocess.call(['tar', '-xvf', tarchive]) + urls = ["https://justgetflux.com/linux/xflux64.tgz", + "https://justgetflux.com/linux/xflux11.tgz", + "https://justgetflux.com/linux/xflux12.tgz"] + else: + raise Exception("Unexpected maxsize = %i!" % maxsize) + for url in urls: + tarchive = "/tmp/xflux.tgz" + subprocess.call(['wget', url, '-O', tarchive]) + subprocess.call(['tar', '-xvf', tarchive]) if __name__ == '__main__': download_xflux()