From 75185696527ff2dd47f8f8bb524609a474596c75 Mon Sep 17 00:00:00 2001 From: zeus Date: Tue, 31 Aug 2021 17:42:21 +0200 Subject: [PATCH] make sure that there is only one hit by resolving links --- bash/aptinfo.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bash/aptinfo.sh b/bash/aptinfo.sh index 56bbd8d..b4a4628 100755 --- a/bash/aptinfo.sh +++ b/bash/aptinfo.sh @@ -1,4 +1,5 @@ #!/bin/bash # shows `apt-cache show`information for a package that given binary belongs to (relative path) -apt-cache show $(apt-file search $(readlink -f "$(which $1)") | cut -d ":" -f 1) +#apt-cache show $(apt-file search $(readlink -f "$(which $1)") | cut -d ":" -f 1) +apt-cache show $(dpkg -S $(readlink -f "$(which $1)") | cut -d ":" -f 1) exit 0