detecht rasp pi
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
shimunn 2019-04-20 18:11:15 +02:00
parent d1ac73034b
commit 54ad7cbcf9

View File

@ -8,10 +8,7 @@ version_re = "seafile-server-?_?([\d\.]*)"
seaf_home = os.environ["SEAF"] or "/opt/seafile" seaf_home = os.environ["SEAF"] or "/opt/seafile"
def available(page): def available(page):
(arch, _) = platform.architecture() arch = platform.machine()
if arch == "64bit":
arch = "x86-64"
else: arch = "i386"
link = "http(s?):\/\/[^ \"\(\)\<\>]*%s_?%s.tar.gz" % (version_re ,arch) link = "http(s?):\/\/[^ \"\(\)\<\>]*%s_?%s.tar.gz" % (version_re ,arch)
resp = requests.get(page) resp = requests.get(page)
available = {} available = {}
@ -99,6 +96,8 @@ def download(url, version):
return 0 return 0
def install_command(url, version): 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) pkg = download(url, version)
tmp = tempfile.mkdtemp() tmp = tempfile.mkdtemp()
if pkg and call(["/bin/sh", "-c", 'cd %s; tar xzvf %s' % (tmp, pkg)]) == 0: if pkg and call(["/bin/sh", "-c", 'cd %s; tar xzvf %s' % (tmp, pkg)]) == 0: