Browse Source

pkgsearch: show package count before installing

pull/6/head
DanielFGray 3 years ago
parent
commit
88f950b8b9
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      pkgsearch

+ 5
- 4
pkgsearch View File

@@ -69,12 +69,13 @@ fzf() {
}

install() {
local installer pkgs
installer="$1"
local pkgs count
mapfile -t pkgs
(( ${#pkgs} > 0 )) || exit
echo "installing ${pkgs[*]}"
$installer "${pkgs[@]}" < /dev/tty
count="${#pkgs[@]} package"
(( ${#pkgs[@]} > 1 )) && count+='s'
echo "installing ${count}: ${pkgs[*]}"
$1 "${pkgs[@]}" < /dev/tty
}

debian() {

Loading…
Cancel
Save