diff --git a/loaih/__init__.py b/loaih/__init__.py index f6efe2d..2c1c1f2 100644 --- a/loaih/__init__.py +++ b/loaih/__init__.py @@ -49,10 +49,7 @@ class Build(object): for arch in self.arch: print("DEBUG: {appimage}".format(appimage = self.appimagefilename[arch])) - res = subprocess.check_output("find {path} -name '{appimage}'".format( - path = self.storage_path, - appimage = self.appimagefilename[arch] + ('.zsync' if self.updatable else '') - ), shell=True).decode('utf-8').strip('\n') + res = subprocess.check_output("find {path} -name '{appimage}'".format(path = self.storage_path, appimage = self.appimagefilename[arch] + ('.zsync' if self.updatable else '')), shell=True).decode('utf-8').strip('\n') if len(res) > 1: self.built = True diff --git a/scripts/loaih-build b/scripts/loaih-build index 2e9bcf6..111e64f 100644 --- a/scripts/loaih-build +++ b/scripts/loaih-build @@ -20,26 +20,25 @@ def build(arch, language, offline, portable, updatable, download, storage, check # We need to build it twice. arches = [ u'x86', u'x86_64' ] else: - arches = [ arch.lower() ] + arches = [ arch.lower().decode('utf-8') ] - for arch in arches: - obj = loaih.Build(query, arch) + obj = loaih.Build(query, arches) - obj.language = language - obj.offline_help = offline - obj.portable = portable - obj.updatable = updatable + obj.language = language + obj.offline_help = offline + obj.portable = portable + obj.updatable = updatable - if check: - obj.check(storage) - else: - obj.storage_path = storage + if check: + obj.check(storage) + else: + obj.storage_path = storage - obj.download(download) - obj.build() - obj.checksums() - obj.move() - del obj + obj.download(download) + obj.build() + obj.checksums() + obj.move() + del obj if __name__ == '__main__': build()