This commit is contained in:
PanPernicek 2021-01-14 09:49:13 +00:00
parent e12f948ba9
commit 90f58946d2

89
pmm/wtf Normal file
View file

@ -0,0 +1,89 @@
#!/bedrock/libexec/busybox awk -f
#
# Package Manager Manager wtf support script
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
#
# Copyright (c) 2018-2020 Daniel Thau <danthau@bedrocklinux.org>
system_package_managers["wtf"]
package_manager_canary_executables["wtf"] = "wtf"
#
# General, operation independent flags.
#
# Unlike operations, flags should not have implementations[].
#
user_interfaces["wtf", "assume-no"] = "-n/--no"
user_interfaces["wtf", "assume-yes"] = "-y/--yes"
user_interfaces["wtf", "confirm"] = "-i/--interactive"
user_interfaces["wtf", "quiet"] = "-q/--quiet"
user_interfaces["wtf", "verbose"] = "-v/--verbose"
user_interfaces["wtf", "strat"] = "--strat/--s"
user_interfaces["wtf", "package-manager"] = "--p/--package-manager"
user_interfaces["wtf", "newest"] = "--n"
user_interfaces["wtf", "oldest"] = "--o"
user_interfaces["wtf", "approx-version"] = "--a"
user_interfaces["wtf", "exact-version"] = "--eq"
user_interfaces["wtf", "newer-or-equal"] = "--neq"
user_interfaces["wtf", "newer-than"] = "--nt"
user_interfaces["wtf", "older-or-equal"] = "--oeq"
user_interfaces["wtf", "older-than"] = "--ot"
user_interfaces["wtf", "every"] = "--e"
#
# Operations which directly forward the underlying command output.
#
user_interfaces["wtf", "install-packages"] = "pmm i/--install <pkgs>"
user_interfaces["wtf", "reinstall-packages"] = "pmm fi/--force-install <pkgs>"
user_interfaces["wtf", "remove-packages-limited"] = "pmm r/--remove-limited <pkgs>" # uses combine remove-packages,remove-orphans
user_interfaces["wtf", "remove-packages-full"] = "pmm rf/--remove-full <pkgs>" # uses combine remove-packages,remove-orphans
user_interfaces["wtf", "verify-packages"] = "pmm v/--verify <pkgs>" # could not find operation in package manager documentation
user_interfaces["wtf", "verify-all-packages"] = "pmm va/--verify -all <pkgs>"
user_interfaces["wtf", "mark-packages-explicit"] = "pmm me/--mark-explicit <pkgs>" # implicit with wtf add
user_interfaces["wtf", "mark-packages-implicit"] = "pmm mi/--mark-implicit <pkgs>" # implicit with wtf del
user_interfaces["wtf", "show-package-information"] = "pmm g/--get <pkgs>"
user_interfaces["wtf", "clear-cache"] = "pmm c/--clear" # could not find operation in package manager documentation
user_interfaces["wtf", "remove-orphans"] = "pmm ro/--remove-orphans" # implicit with wtf del
user_interfaces["wtf", "update-package-database"] = "pmm ud/--update-packages" # no separate file database concept, using combine
user_interfaces["wtf", "update-file-database"] = "pmm uf/--update-file" # file search command does online query, no local database
user_interfaces["wtf", "upgrade-packages-limited"] = "pmm u/--upgrade <pkgs>" # no limited upgrade concept
user_interfaces["wtf", "upgrade-packages-full"] = "pmm u/--upgrade"
# Combine operations.
#
user_interfaces["wtf", "clear-cache,remove-orphans"] = "pmm o"
user_interfaces["wtf", "mark-packages-implicit,remove-orphans"] = "pmm mir <pkgs>"
user_interfaces["wtf", "remove-packages-limited,remove-orphans"] = "pmm rlo"
user_interfaces["wtf", "remove-packages-full,remove-orphans"] = "pmm rfo <pkgs>"
user_interfaces["wtf", "update-package-database,update-file-database"] = "pmm up"
user_interfaces["wtf", "update-package-database,upgrade-packages-partial"] = "pmm up <pkgs>"
user_interfaces["wtf", "update-package-database,upgrade-packages-full"] = "pmm uu"
user_interfaces["wtf", "update-package-database,update-file-database,upgrade-packages-partial"] = "pmm uuu <pkgs>"
user_interfaces["wtf", "update-package-database,update-file-database,upgrade-packages-full"] = "pmm uuu"
user_interfaces["wtf", "update-package-database,install-packages"] = "pmm ui"
user_interfaces["wtf", "update-package-database,update-file-database,install-packages"] = "pmm uui"
user_interfaces["wtf", "upgrade-packages-limited,install-packages"] = "pmm uli"
user_interfaces["wtf", "upgrade-packages-full,install-packages"] = "pmm ufi"
user_interfaces["wtf", "update-package-database,upgrade-packages-partial,install-packages"] = "pmm uuli"
user_interfaces["wtf", "update-package-database,upgrade-packages-full,install-packages"] = "pmm uufi"
user_interfaces["wtf", "update-package-database,update-file-database,upgrade-packages-partial,install-packages"] = "pmm uuuli"
user_interfaces["wtf", "update-package-database,update-file-database,upgrade-packages-full,install-packages"] = "pmm uuufi"
#
# Operations which have a standardized output format.
#
user_interfaces["wtf", "list-installed-package-files"] = "pmm q <pkgs>"
user_interfaces["wtf", "list-installed-explicit"] = "pmm qie" # not explicitly raised via user interface
user_interfaces["wtf", "list-installed-implicit"] = "pmm qii" # not explicitly raised via user interface
user_interfaces["wtf", "list-installed-packages"] = "pmm qi"
user_interfaces["wtf", "list-available-packages"] = "pmm q"
user_interfaces["wtf", "search-for-package-by-name"] = "pmm sn <text>"
user_interfaces["wtf", "search-for-package-by-all"] = "pmm s <text>"
user_interfaces["wtf", "which-package-owns-file"] = "pmm qw <file>"
user_interfaces["wtf", "which-packages-provide-file"] = "pmm qp <file>"