Changed debian detection.

This commit is contained in:
Stefan Gaiselmann 2023-01-16 14:23:17 +01:00
parent eb1784eca0
commit 800238fd2d

View File

@ -113,19 +113,27 @@ list-ssh-keys() {
done
}
{{- if (or (eq .chezmoi.osRelease.id "debian") (eq .chezmoi.osRelease.id "linuxmint") (eq .chezmoi.osRelease.id "ubuntu")) }}
# Show version of a Debian package
debversion() {
local pkgname="${1:?packagename required}"
dpkg -s $pkgname | grep Version
if [ -x dpkg ]; then
local pkgname="${1:?packagename required}"
dpkg -s $pkgname | grep Version
else
echo "not a Debian based system!"
return 42
fi
}
# Show files of a Debian package
deblist() {
local pkgname="${1:?packagenamme required}"
dpkg-query -L $pkgname
if [ -x dpkg ]; then
local pkgname="${1:?packagenamme required}"
dpkg-query -L $pkgname
else
echo "not a Debian based system!"
return 42
fi
}
{{- end }}
# Run 'top' by a list of processes matching name.
topby() {