Browse Source

pkgsearch: show package count before installing

pull/6/head
DanielFGray 6 years ago
parent
commit
88f950b8b9
  1. 9
      pkgsearch

9
pkgsearch

@ -69,12 +69,13 @@ fzf() { @@ -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