pkg/query

This commit is contained in:
Marc Beninca 2024-09-08 19:36:55 +02:00
parent 8d86912ab1
commit 794abeb351
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -993,17 +993,6 @@ ${name}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET}
# │ f │ pm = package manager │
# ╰───┴──────────────────────╯
spcd_f_pm_query() {
case "${SPCD_PM}" in
"${SPCD_PM_APK}") apk info "${1}" ;;
"${SPCD_PM_APT}") dpkg-query --show "${1}" ;;
"${SPCD_PM_DNF}") rpm --query "${1}" ;;
"${SPCD_PM_PACMAN}") pacman --query "${1}" ;;
"${SPCD_PM_ZYPPER}") rpm --query "${1}" ;;
*) ;;
esac
}
# ╭───┬────┬───────╮
# │ f │ pm │ https │
# ╰───┴────┴───────╯
@ -1084,6 +1073,17 @@ spcd_f_pm_pkg_install() {
spcd_f_pm_pkg_clean
}
spcd_f_pm_pkg_query() {
case "${SPCD_PM}" in
"${SPCD_PM_APK}") apk info "${1}" ;;
"${SPCD_PM_APT}") dpkg-query --show "${1}" ;;
"${SPCD_PM_DNF}") rpm --query "${1}" ;;
"${SPCD_PM_PACMAN}") pacman --query "${1}" ;;
"${SPCD_PM_ZYPPER}") rpm --query "${1}" ;;
*) ;;
esac
}
spcd_f_pm_pkg_update() {
spcd_step "Update"
case "${SPCD_PM}" in