(cfg: Dict, distro: str)
| 1283 | print(tr(cfg, "programs_done")) |
| 1284 | |
| 1285 | def update_distro_and_programs(cfg: Dict, distro: str) -> None: |
| 1286 | family = detect_family(distro) |
| 1287 | print(f"{tr(cfg,'update_title')} {distro}") |
| 1288 | if family == "debian": |
| 1289 | cmd = "apt-get update -y && apt-get upgrade -y && apt-get autoremove -y || true" |
| 1290 | elif family == "arch": |
| 1291 | cmd = "pacman -Syu --noconfirm || true" |
| 1292 | elif family == "alpine": |
| 1293 | cmd = "apk update && apk upgrade || true" |
| 1294 | elif family == "fedora": |
| 1295 | cmd = "dnf -y upgrade || true" |
| 1296 | elif family == "suse": |
| 1297 | cmd = "zypper --non-interactive refresh || true; zypper --non-interactive update || true" |
| 1298 | elif family == "void": |
| 1299 | cmd = "xbps-install -Suy || true" |
| 1300 | else: |
| 1301 | cmd = "" |
| 1302 | if not cmd: |
| 1303 | print(tr(cfg, "programs_not_supported")) |
| 1304 | return |
| 1305 | run(proot_login_cmd(distro, cmd), check=False) |
| 1306 | print(tr(cfg, "update_done")) |
| 1307 | |
| 1308 | # ---------------------------- |
| 1309 | # Launcher creation |
no test coverage detected