Fix bug of installPackage()

This commit is contained in:
Santiago Lo Coco 2022-01-03 00:04:16 -03:00
parent 65315340ea
commit 8d4f61a91a
1 changed files with 9 additions and 9 deletions

View File

@ -162,8 +162,8 @@ installPackage() {
case ${2} in case ${2} in
A) A)
if [ $debugFlagToStdout = true ] || [ $debugFlag = true ]; then if [ $debugFlagToStdout = true ] || [ $debugFlag = true ]; then
# script -qec "pacstrap /mnt --needed ${1}" /dev/null 2>&1 | debug script -qec "pacstrap /mnt --needed ${1}" /dev/null 2>&1 | debug
( unbuffer pacstrap /mnt --needed ${1} 2>&1 && cat) | debug # ( unbuffer pacstrap /mnt --needed ${1} 2>&1 && cat) | debug
else else
pacstrap /mnt --needed ${1} 2>&1 | debug pacstrap /mnt --needed ${1} 2>&1 | debug
fi fi
@ -202,12 +202,12 @@ checkForParu() {
fi fi
} }
checkForExpect() { # checkForExpect() {
commOutput=$(command -v paru > /dev/null 2>&1 || echo 1) # commOutput=$(command -v paru > /dev/null 2>&1 || echo 1)
if [ "$commOutput" = "1" ]; then # if [ "$commOutput" = "1" ]; then
pacman -S --needed --noconfirm expect # pacman -S --needed --noconfirm expect
fi # fi
} # }
getThePackages() { getThePackages() {
set -o pipefail set -o pipefail
@ -217,7 +217,7 @@ getThePackages() {
local IFS=, local IFS=,
while read -r NAME IMPORTANT INSTALL; do while read -r NAME IMPORTANT INSTALL; do
if [ "$IMPORTANT" = "${1}" ]; then if [ "$IMPORTANT" = "${1}" ]; then
installPackage "$NAME" "$INSTALL" "${2}" installPackage "$NAME" "$INSTALL" "${2}" < /dev/null
fi fi
done < packages.csv done < packages.csv
set +o pipefail set +o pipefail