Make updater stop breaking my shit

This commit is contained in:
DazedAnon 2026-06-15 17:16:00 -05:00
parent 367e974b77
commit 563299ba21
5 changed files with 6 additions and 0 deletions

0
START.sh Normal file → Executable file
View file

0
gameupdate/GameUpdate_linux.sh Normal file → Executable file
View file

0
gameupdate/gameupdate/patch.sh Normal file → Executable file
View file

View file

@ -132,6 +132,9 @@ class UpdateThread(QThread):
PROTECTED = {".env", "venv", "log", "files", "translated",
"vocab.txt", "last_update_sha.txt"}
# GitLab zip archives do not preserve Unix execute bits; restore after apply.
EXECUTABLE_SUFFIXES = {".sh"}
progress = pyqtSignal(str) # status message
finished = pyqtSignal(bool, str) # (success, message)
@ -214,6 +217,9 @@ class UpdateThread(QThread):
else:
dst.parent.mkdir(parents=True, exist_ok=True)
shutil.copy2(src, dst)
if dst.suffix in self.EXECUTABLE_SUFFIXES:
mode = dst.stat().st_mode | 0o111
dst.chmod(mode)
Path(self.SHA_FILE).write_text(latest_sha)
try:

0
tests/run_tests.sh Normal file → Executable file
View file