Changed debian detection.
This commit is contained in:
parent
eb1784eca0
commit
800238fd2d
@ -113,19 +113,27 @@ list-ssh-keys() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
{{- if (or (eq .chezmoi.osRelease.id "debian") (eq .chezmoi.osRelease.id "linuxmint") (eq .chezmoi.osRelease.id "ubuntu")) }}
|
|
||||||
# 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
|
||||||
}
|
}
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
# Run 'top' by a list of processes matching name.
|
# Run 'top' by a list of processes matching name.
|
||||||
topby() {
|
topby() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user