Update cloneAndMake()

This commit is contained in:
Santiago Lo Coco 2022-01-19 00:44:04 -03:00
parent 0d5a02855f
commit 532b2ab640
1 changed files with 5 additions and 1 deletions

View File

@ -1,9 +1,13 @@
#!/usr/bin/env bash
cloneAndMake() {
if [ -z $password ]; then
password=$(displayDialogBox --passwordbox "Enter your password" VALUES 3>&1 1>&2 2>&3)
echo "$password" | sudo -S bash -c "" > /dev/null 2>&1
fi
displayDialogBox --infobox "Downloading ${1}" VALUES
git clone "$2" 2>&1 | debug
(cd "$1" || { echo "Couldn't cd into '$1'." 1>&2 && exit 1; }; sudo make install 2>&1 | debug)
(cd "$1" || { echo "Couldn't cd into '$1'." 1>&2 && exit 1; }; echo "$password" | sudo make install 2>&1 | debug)
}
downloadAndInstallPackages() {