Update cloneAndMake()

This commit is contained in:
Santiago Lo Coco 2022-01-27 01:19:08 -03:00
parent b5a09241db
commit d6447146aa
1 changed files with 4 additions and 1 deletions

View File

@ -5,9 +5,12 @@ cloneAndMake() {
password=$(whiptail --passwordbox "Enter your password" 8 25 3>&1 1>&2 2>&3)
echo "$password" | sudo -S bash -c "" > /dev/null 2>&1
fi
local TERM=ansi; whiptail --infobox "Downloading ${1}" 7 0
git clone "$2"
(cd "$1" || { echo "Couldn't cd into '$1'." 1>&2 && exit 1; }; echo "$password" | sudo make install)
makeMsg=laptop && [[ -v LAPTOP ]] || makeMsg=install
(cd "$1" || { echo "Couldn't cd into '$1'." 1>&2 && exit 1; }; echo "$password" | sudo make "$makeMsg")
}
downloadAndInstallPackages() {