diff options
author | davidovski <david@davidovski.xyz> | 2022-01-07 22:49:36 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-01-07 22:49:36 +0000 |
commit | 522470e4c6af96f94083c4ba7ef2ff4488458f74 (patch) | |
tree | 7602a8cb740ae0b86ca5dced51325bf021fc1370 /src/verbs/update.py | |
parent | 990511332009d1e1947aa89867c3d9ecb22941ac (diff) |
moved install script to other repo
Diffstat (limited to 'src/verbs/update.py')
-rw-r--r-- | src/verbs/update.py | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/verbs/update.py b/src/verbs/update.py index 4348637..6fe89f6 100644 --- a/src/verbs/update.py +++ b/src/verbs/update.py @@ -3,7 +3,7 @@ import util import colors import time -from verbs.install import find_package, install_single +from verbs.install import find_package, install_multiple from verbs.sync import sync VERSION_COMPARED = "CHECKSUM" @@ -26,7 +26,7 @@ def get_available_version(package_name, config, root="/"): repos = config["repos"] packages_dir = config["dir"]["packages"] sources = config["sources"] - checksum, found_sources, requested_repo = find_package(package_name, repos, packages_dir, sources) + checksum, found_sources, requested_repo, size, files = find_package(package_name, repos, packages_dir, sources) return checksum def update(args, options, config): @@ -41,17 +41,7 @@ def update(args, options, config): updates = [update for update in updates if update in args] if len(updates) > 0: - print(colors.CLEAR_LINE + colors.RESET, end="") - print(colors.BLUE + "The following packages will be updated:") - print(end="\t") - for d in updates: - print(colors.BLUE if d in args else colors.LIGHT_BLUE, d, end="") - print() - - if util.ask_confirmation(colors.BLUE + "Continue?", no_confirm=options["y"]): - for package in updates: - install_single(package, options, config, verbose=v, post_install=False, unsafe=options["u"]) - util.fill_line(f"Updated {package}", colors.BG_CYAN + colors.LIGHT_BLACK, end="\n") + install_multiple(updates, args, options, config, terminology=("update", "updated", "updating")) else: print(colors.LIGHT_RED + "Nothing to do") |