diff --git a/START.sh b/START.sh old mode 100644 new mode 100755 diff --git a/gameupdate/GameUpdate_linux.sh b/gameupdate/GameUpdate_linux.sh old mode 100644 new mode 100755 diff --git a/gameupdate/gameupdate/patch.sh b/gameupdate/gameupdate/patch.sh old mode 100644 new mode 100755 diff --git a/gui/main.py b/gui/main.py index 7aa5b3f..fd35eb5 100644 --- a/gui/main.py +++ b/gui/main.py @@ -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: diff --git a/tests/run_tests.sh b/tests/run_tests.sh old mode 100644 new mode 100755