turn into a cell package

This commit is contained in:
2025-12-08 17:39:17 -06:00
parent aae267a6e9
commit 38d6b4d4e8
52 changed files with 44 additions and 1 deletions

45
update.ce Normal file
View File

@@ -0,0 +1,45 @@
// cell update [alias] - Update packages to latest versions and rebuild dynamic libraries
//
// This command:
// 1. Updates all packages from their remote sources
// 2. Rebuilds all dynamic libraries via 'cell build -d'
var shop = use('shop')
var os = use('os')
var target = null
// Parse arguments
for (var i = 0; i < args.length; i++) {
if (args[i] == '--target' || args[i] == '-t') {
if (i + 1 < args.length) {
target = args[i + 1]
i++
}
} else if (args[i] == '--help' || args[i] == '-h') {
log.console("Usage: cell update [options]")
log.console("Update packages and rebuild dynamic libraries.")
log.console("")
log.console("Options:")
log.console(" --target, -t <target> Build for specific target platform")
log.console("")
log.console("This command updates all installed packages from their remote")
log.console("sources, then rebuilds all dynamic libraries.")
$_.stop()
}
}
var packages = shop.list_shop_packages()
log.console("Checking for updates (" + packages.length + " packages)...")
// 1. Update all packages
for (var info of packages) {
var pack = info.package
if (!pack || pack == 'core') continue
log.console("Updating " + pack)
shop.update(pack)
}
$_.stop()