From 03f804f1f30f8d82bb4c91c6dd8121b5836409b3 Mon Sep 17 00:00:00 2001 From: "Heavy@Hetzner" Date: Fri, 27 Jan 2023 09:38:17 +0000 Subject: [PATCH] Removed dpkg check, check is already done on installation. --- dot_bashrc.d/executable_09.functions.tmpl | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/dot_bashrc.d/executable_09.functions.tmpl b/dot_bashrc.d/executable_09.functions.tmpl index 0b663d5..2414270 100755 --- a/dot_bashrc.d/executable_09.functions.tmpl +++ b/dot_bashrc.d/executable_09.functions.tmpl @@ -117,24 +117,14 @@ list-ssh-keys() { {{ if eq .chezmoi.osRelease.id "debian" }} # Show version of a Debian package debversion() { - if [ -x dpkg ]; then - local pkgname="${1:?packagename required}" - dpkg -s $pkgname | grep Version - else - echo "not a Debian based system!" - return 42 - fi + local pkgname="${1:?packagename required}" + dpkg -s $pkgname | grep Version } # Show files of a Debian package deblist() { - if [ -x dpkg ]; then - local pkgname="${1:?packagenamme required}" - dpkg-query -L $pkgname - else - echo "not a Debian based system!" - return 42 - fi + local pkgname="${1:?packagenamme required}" + dpkg-query -L $pkgname } # Show apt installation history