Files
darwin-apk/Sources/dpk-cli/Subcommands/DpkUpgradeCommand.swift

25 lines
653 B
Swift
Raw Normal View History

2024-11-10 17:51:53 +11:00
/*
* darwin-apk © 2024 Gay Pizza Specifications
* SPDX-License-Identifier: Apache-2.0
*/
import ArgumentParser
struct DpkUpgradeCommand: ParsableCommand {
static let configuration = CommandConfiguration(
commandName: "upgrade",
abstract: "Upgrade installed packages.",
aliases: [ "U" ])
@Argument(help: "Optionally specify packages to upgrade. Otherwise upgrade all packages installed on the system.")
var packages: [String] = []
func run() throws {
if packages.isEmpty {
eprint("upgrading system")
} else {
eprint("upgrading individual packages: \"\(packages.joined(separator: "\", \""))\"")
}
}
}