Self-updates and program list from the repo

This commit is contained in:
sarah committed 2026-10-09 10:38:21 +02:00
1 parent d9da8438c2
commit e4272bd606
9 files changed
+416 -15

No files matched your search

+15
View File
@@ -5,12 +5,16 @@
SaraSuite update <Name>
SaraSuite options <Name> [--option Id=on|off ...] (no --option: list them)
SaraSuite remove <Name> [--configs] [--keep-runtime]
SaraSuite self-update (AppImage only)
Install starts from your defaults (Settings, or the manifest's) unless set.
"""
import argparse
import SelfUpdate
from Catalog import UpdateCatalog
from Core import AppVersion
from Installer import Apply, DefaultAnswers, DefaultOptions, FetchCommit, GetStatus, Remove
from Manifests import LoadPrograms
@@ -45,8 +49,19 @@ def Run(Arguments: list[str]) -> int:
RemoveCommand.add_argument("Name")
RemoveCommand.add_argument("--configs", action="store_true")
RemoveCommand.add_argument("--keep-runtime", action="store_true")
Commands.add_parser("self-update")
Args = Parser.parse_args(Arguments)
if Args.Command == "self-update":
Latest = SelfUpdate.LatestRelease()
if Latest is None or not SelfUpdate.IsNewer(Latest.Version):
print(f"SaraSuite {AppVersion} is the latest.")
return 0
SelfUpdate.Install(Latest, print)
return 0
UpdateCatalog(print) # the program list from the SaraSuite repo (AppImage only)
Programs = {Program.Name.lower(): Program for Program in LoadPrograms()}
if Args.Command == "list":
for Program in Programs.values():