mirror of
https://github.com/CMiksche/gitea-auto-update
synced 2025-12-10 07:57:23 +01:00
Change mv to cp to preserve SELinux permissions
This commit is contained in:
@@ -74,10 +74,13 @@ class Download:
|
||||
# extracting download file
|
||||
cmd = "xz -d " + self.tmp_xz
|
||||
os.system(cmd)
|
||||
# moving temp file to gtfile location
|
||||
cmd = 'mv ' + self.tmp_dir + 'gitea-' + self.github_version \
|
||||
# copying temp file to gtfile location. Copying preserves SELinux permissions
|
||||
cmd = 'cp ' + self.tmp_dir + 'gitea-' + self.github_version \
|
||||
+ '-' + self.gt_system + ' ' + self.gt_file
|
||||
os.system(cmd)
|
||||
# cleaning up tmp file
|
||||
cmd = 'rm -f ' + self.tmp_dir + 'gitea-' + self.github_version + '-' + self.gt_system
|
||||
os.system(cmd)
|
||||
cmd = 'chmod +x ' + self.gt_file
|
||||
os.system(cmd)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user