This commit is contained in:
parent
d1ac73034b
commit
54ad7cbcf9
@ -8,10 +8,7 @@ version_re = "seafile-server-?_?([\d\.]*)"
|
||||
seaf_home = os.environ["SEAF"] or "/opt/seafile"
|
||||
|
||||
def available(page):
|
||||
(arch, _) = platform.architecture()
|
||||
if arch == "64bit":
|
||||
arch = "x86-64"
|
||||
else: arch = "i386"
|
||||
arch = platform.machine()
|
||||
link = "http(s?):\/\/[^ \"\(\)\<\>]*%s_?%s.tar.gz" % (version_re ,arch)
|
||||
resp = requests.get(page)
|
||||
available = {}
|
||||
@ -99,6 +96,8 @@ def download(url, version):
|
||||
return 0
|
||||
|
||||
def install_command(url, version):
|
||||
if platform.machine() == "armv7l":
|
||||
url = "https://github.com/haiwen/seafile-rpi/releases/download/v%s/seafile-server_%s_stable_pi.tar.gz" % (version,version)
|
||||
pkg = download(url, version)
|
||||
tmp = tempfile.mkdtemp()
|
||||
if pkg and call(["/bin/sh", "-c", 'cd %s; tar xzvf %s' % (tmp, pkg)]) == 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user