diff --git a/loaih/__init__.py b/loaih/__init__.py index 0c57bc9..5c08954 100644 --- a/loaih/__init__.py +++ b/loaih/__init__.py @@ -50,6 +50,7 @@ class Build(object): # understood the storage_path can be changed before that phase. self.relative_path = [] self.full_path = '' + self.baseurl = '' def calculate(self): @@ -321,6 +322,7 @@ class Build(object): # Creating versions for short version and query text versions = [ self.short_version, self.branch_version ] for arch in Build.ARCHSTD: + os.chdir(self.full_path) # if the appimage for the reported arch is not found, skip to next # arch if not os.path.exists(self.appimagefilename[arch]): @@ -331,16 +333,17 @@ class Build(object): appimagefilename[arch] = self.appname + '-' + version + self.languagepart + self.helppart + f'-{arch}.AppImage' zsyncfilename[arch] = appimagefilename[arch] + '.zsync' - os.chdir(self.full_path) # Create the symlink + print(f"Creating {appimagefilename[arch]} and checksums.") os.symlink(self.appimagefilename[arch], appimagefilename[arch]) # Create the checksum for the AppImage - subprocess.run(shlex.split("md5sum {item} > {item}.md5".format(item=appimagefilename[arch]))) + subprocess.run(shlex.split(f"md5sum {appimagefilename[arch]} > {appimagefilename[arch]}.md5")) # Do not continue if no zsync file is provided. if not self.updatable: continue - os.copy(self.zsyncfilename[arch], zsyncfilename[arch]) + print(f"Creating zsync file for version {version}.") + shutil.copyfile(self.zsyncfilename[arch], zsyncfilename[arch]) # Editing the zsyncfile subprocess.run(shlex.split(f"sed -i'' -e 's/^Filename:.*$/Filename: {appimagefilename[arch]}/' {zsyncfilename[arch]}"))