Browse Source

Enable yum_hasbin handle any kind of file, not just bin

Alois Mahdal 8 years ago
parent
commit
7958b78edb
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      dotfiles/bash/main.bashrc

+ 4
- 1
dotfiles/bash/main.bashrc View File

@@ -198,7 +198,10 @@ yum_hasbin() {
198 198
     local bname
199 199
     for bname in "$@";
200 200
     do
201
-        dnf provides "*bin/$bname" \
201
+        case $bname in
202
+            */*)    dnf provides "$bname" ;;
203
+            *)      dnf provides "*/bin/$bname" ;;
204
+        esac \
202 205
           | grep '^.' \
203 206
           | grep -E '^[0-9a-zA-Z_:.-]+ :'
204 207
     done