mirror of
https://github.com/GayPizzaSpecifications/darwin-apk.git
synced 2025-08-03 13:31:32 +00:00
24 lines
618 B
Swift
24 lines
618 B
Swift
/*
|
|
* darwin-apk © 2024 Gay Pizza Specifications
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import Foundation
|
|
import ArgumentParser
|
|
import darwin_apk
|
|
|
|
struct DpkUpdateCommand: AsyncParsableCommand {
|
|
static let configuration = CommandConfiguration(
|
|
commandName: "update",
|
|
abstract: "Update the system package repositories.",
|
|
aliases: [ "u" ])
|
|
|
|
func run() async throws {
|
|
print("Updating package repositories")
|
|
let repositories = try await RepositoriesConfig().repositories
|
|
var updater = ApkIndexUpdater()
|
|
updater.repositories.append(contentsOf: repositories)
|
|
updater.update()
|
|
}
|
|
}
|