mirror of
https://github.com/GayPizzaSpecifications/darwin-apk.git
synced 2025-08-03 21:41:31 +00:00
Initial implementation of APKINDEX, fetching, reading, parsing, & merging
This commit is contained in:
21
Sources/dpk-cli/Subcommands/DpkUpgradeCommand.swift
Normal file
21
Sources/dpk-cli/Subcommands/DpkUpgradeCommand.swift
Normal file
@ -0,0 +1,21 @@
|
||||
// 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 {
|
||||
print("upgrading system")
|
||||
} else {
|
||||
print("upgrading invidual packages: \"\(packages.joined(separator: "\", \""))\"")
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user