improved fetch

This commit is contained in:
2026-02-20 15:00:08 -06:00
parent 4ac92c8a87
commit 35d0890242
14 changed files with 504 additions and 462 deletions

View File

@@ -18,29 +18,30 @@ var prune = false
var dry_run = false
var i = 0
for (i = 0; i < length(args); i++) {
if (args[i] == '--prune') {
prune = true
} else if (args[i] == '--dry-run') {
dry_run = true
} else if (args[i] == '--help' || args[i] == '-h') {
log.console("Usage: cell remove <locator> [options]")
log.console("")
log.console("Remove a package from the shop.")
log.console("")
log.console("Options:")
log.console(" --prune Also remove packages no longer needed by any root")
log.console(" --dry-run Show what would be removed")
$stop()
} else if (!starts_with(args[i], '-')) {
target_pkg = args[i]
var run = function() {
for (i = 0; i < length(args); i++) {
if (args[i] == '--prune') {
prune = true
} else if (args[i] == '--dry-run') {
dry_run = true
} else if (args[i] == '--help' || args[i] == '-h') {
log.console("Usage: cell remove <locator> [options]")
log.console("")
log.console("Remove a package from the shop.")
log.console("")
log.console("Options:")
log.console(" --prune Also remove packages no longer needed by any root")
log.console(" --dry-run Show what would be removed")
return
} else if (!starts_with(args[i], '-')) {
target_pkg = args[i]
}
}
}
if (!target_pkg) {
log.console("Usage: cell remove <locator> [options]")
$stop()
}
if (!target_pkg) {
log.console("Usage: cell remove <locator> [options]")
return
}
target_pkg = shop.resolve_locator(target_pkg)
@@ -100,5 +101,7 @@ if (dry_run) {
log.console("Removed " + text(length(packages_to_remove)) + " package(s).")
}
}
run()
$stop()