avoid piping yes to makepkg · E5ten/pacaur@12707cc

@@ -758,7 +758,7 @@ MakePkgs() {

758758

for j in "${VCSCLIENTS[@]}"; do

759759

if [[ ! "${vcschecked[@]}" =~ "$vcspkg" && $(awk -F "::" '{print $1}' <<< $j) == "$vcspkg" ]]; then

760760

vcsclient=$(awk -F "::" '{print $NF}' <<< $j) && vcschecked+=($vcspkg)

761-

[[ -z "$(expac -Qs '%n' "^$vcsclient$")" ]] && yes $(gettext pacman Y) | sudo $pacmanbin -S $vcsclient --asdeps

761+

[[ -z "$(expac -Qs '%n' "^$vcsclient$")" ]] && sudo $pacmanbin -S $vcsclient --asdeps --noconfirm

762762

fi

763763

done

764764

fi

@@ -788,7 +788,7 @@ MakePkgs() {

788788

# install provider packages

789789

if [[ -n "${providerspkgs[@]}" ]]; then

790790

Note "i" $"Installing ${colorW}${providerspkgs[@]}${reset} dependencies..."

791-

yes $(gettext pacman Y) | sudo $pacmanbin -S ${providerspkgs[@]} --asdeps

791+

sudo $pacmanbin -S ${providerspkgs[@]} --ask 36 --asdeps --noconfirm

792792

fi

793793794794

# main

@@ -840,7 +840,7 @@ MakePkgs() {

840840

if [[ $cachedpkg ]]; then

841841

if [[ " ${aurdepspkgs[@]} " =~ " $j " || $installpkg ]]; then

842842

Note "i" $"Installing ${colorW}$j${reset} cached package..."

843-

yes $(gettext pacman Y) | sudo $pacmanbin -U $cachedpkg ${pacopts[@]}

843+

sudo $pacmanbin -U $cachedpkg --ask 36 ${pacopts[@]} --noconfirm

844844

[[ ! " ${aurpkgs[@]} " =~ " $j " ]] && sudo $pacmanbin -D $j --asdeps ${pacopts[@]} &>/dev/null

845845

else

846846

Note "w" $"Package ${colorW}$j${reset} already available in cache"

@@ -857,9 +857,9 @@ MakePkgs() {

857857

if [[ $installpkg ]]; then

858858

# install

859859

if [[ $silent = true ]]; then

860-

yes $(gettext pacman Y) | makepkg -sfi ${makeopts[@]} --pkg ${pkgsdeps[$i]} &>/dev/null

860+

makepkg -sfi ${makeopts[@]} --pkg ${pkgsdeps[$i]} --noconfirm &>/dev/null

861861

else

862-

yes $(gettext pacman Y) | makepkg -sfi ${makeopts[@]} --pkg ${pkgsdeps[$i]}

862+

makepkg -sfi ${makeopts[@]} --pkg ${pkgsdeps[$i]} --noconfirm

863863

fi

864864

else

865865

unset isaurdeps

@@ -870,19 +870,20 @@ MakePkgs() {

870870

# install AUR deps

871871

Note "i" $"Installing ${colorW}${pkgsdeps[$i]}${reset} dependencies..."

872872

if [[ $silent = true ]]; then

873-

yes $(gettext pacman Y) | makepkg -sfi ${makeopts[@]} --pkg ${pkgsdeps[$i]} &>/dev/null

873+

makepkg -sfi ${makeopts[@]} --pkg ${pkgsdeps[$i]} --noconfirm &>/dev/null

874874

else

875-

yes $(gettext pacman Y) | makepkg -sfi ${makeopts[@]} --pkg ${pkgsdeps[$i]}

875+

makepkg -sfi ${makeopts[@]} --pkg ${pkgsdeps[$i]} --noconfirm

876876

fi

877877

else

878878

# install then remove binary deps

879879

if [[ $silent = true ]]; then

880-

yes $(gettext pacman Y) | makepkg -sfr ${makeopts[@]} --pkg ${pkgsdeps[$i]} &>/dev/null

880+

makepkg -sfr ${makeopts[@]} --pkg ${pkgsdeps[$i]} --noconfirm &>/dev/null

881881

else

882-

yes $(gettext pacman Y) | makepkg -sfr ${makeopts[@]} --pkg ${pkgsdeps[$i]}

882+

makepkg -sfr ${makeopts[@]} --pkg ${pkgsdeps[$i]} --noconfirm

883883

fi

884884

fi

885885

fi

886+886887

# clean

887888

if (( $? > 0)); then

888889

errmakepkg+=(${pkgsdeps[$i]})