Rimossi file di destinazione in caso di esistenza.
This commit is contained in:
parent
b21c06038d
commit
f2d0630c15
|
@ -337,6 +337,8 @@ class Build(object):
|
|||
|
||||
# Create the symlink
|
||||
print(f"Creating {appimagefilename[arch]} and checksums.")
|
||||
if os.path.exists(appimagefilename[arch]):
|
||||
os.unlink(appimagefilename[arch])
|
||||
os.symlink(self.appimagefilename[arch], appimagefilename[arch])
|
||||
# Create the checksum for the AppImage
|
||||
subprocess.run(shlex.split(f"md5sum {appimagefilename[arch]} > {appimagefilename[arch]}.md5"))
|
||||
|
@ -345,6 +347,8 @@ class Build(object):
|
|||
continue
|
||||
|
||||
print(f"Creating zsync file for version {version}.")
|
||||
if os.path.exists(zsyncfilename[arch]):
|
||||
os.unlink(zsyncfilename[arch])
|
||||
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]}"))
|
||||
|
|
Loading…
Reference in New Issue