Browse Source

pkgsearch: fedora support

DanielFGray 2 years ago
parent
commit
a64f68edb3
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      pkgsearch

+ 11
- 0
pkgsearch View File

@@ -121,6 +121,15 @@ void() {
121 121
     install 'xbps-install -S'
122 122
 }
123 123
 
124
+fedora() {
125
+  fzf --preview='p={}; p="${p%% *}"; dnf -q info "${p%.*}"' \
126
+    < <(dnf -qC repoquery --qf "${c_green}%{name} ${c_reset}%{version} - %{summary}" \*) |
127
+    awk '{ package=$1; sub(/\.\S+/, "", package); print package }' |
128
+    install 'sudo dnf install'
129
+}
130
+
131
+[[ -s "$config_file" ]] && parse_config_file < "$config_file"
132
+
124 133
 while true; do
125 134
   case "$1" in
126 135
     -r|--reverse)  reverse=1  ; shift ;;
@@ -137,4 +146,6 @@ case "${osrelease%% *}" in
137 146
   debian|ubuntu) debian "$request" ;;
138 147
   arch) arch "$request" ;;
139 148
   void) void "$request" ;;
149
+  fedora) fedora "$request" ;;
150
+  *) die 'unknown distro :(' ;;
140 151
 esac

Loading…
Cancel
Save