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