Ver código fonte

Enable yum_hasbin handle any kind of file, not just bin

Alois Mahdal 8 anos atrás
pai
commit
7958b78edb
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4
    1
      dotfiles/bash/main.bashrc

+ 4
- 1
dotfiles/bash/main.bashrc Ver arquivo

@@ -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