Removed dpkg check, check is already done on installation.

This commit is contained in:
Heavy@Hetzner 2023-01-27 09:38:17 +00:00
parent 13caedb7b1
commit 03f804f1f3

View File

@ -117,24 +117,14 @@ list-ssh-keys() {
{{ if eq .chezmoi.osRelease.id "debian" }} {{ if eq .chezmoi.osRelease.id "debian" }}
# Show version of a Debian package # Show version of a Debian package
debversion() { debversion() {
if [ -x dpkg ]; then local pkgname="${1:?packagename required}"
local pkgname="${1:?packagename required}" dpkg -s $pkgname | grep Version
dpkg -s $pkgname | grep Version
else
echo "not a Debian based system!"
return 42
fi
} }
# Show files of a Debian package # Show files of a Debian package
deblist() { deblist() {
if [ -x dpkg ]; then local pkgname="${1:?packagenamme required}"
local pkgname="${1:?packagenamme required}" dpkg-query -L $pkgname
dpkg-query -L $pkgname
else
echo "not a Debian based system!"
return 42
fi
} }
# Show apt installation history # Show apt installation history