This commit is contained in:
Santiago Lo Coco 2022-02-01 16:39:51 -03:00
parent d555a136f2
commit 7087bf42ef
1 changed files with 7 additions and 11 deletions

View File

@ -94,19 +94,15 @@ getGitconfigData() {
checkForDependencies() { checkForDependencies() {
comm=$1 && [ "$1" = "libnewt" ] && comm=whiptail comm=$1 && [ "$1" = "libnewt" ] && comm=whiptail
command -v "${comm}" &> /dev/null && return 0
command -v "${comm}" &> /dev/null unameOutput=$(uname -a | grep -q "arch")
if [ $? -ne 0 ]; then if [ -f "/etc/arch-release" ] || [ "$unameOutput" -ne 1 ]; then
unameOutput=$(uname -a | grep "arch") sudo pacman --noconfirm --needed -Sy "${1}" && return 0
[ ! -f "/etc/arch-release" ] && [ "$unameOutput" -ne 0 ] && return 1 echo "Couldn't install ${1}. We will continue without it."
sudo pacman --noconfirm --needed -Sy "${1}"
if [ $? -eq 1 ]; then
echo "Couldn't install ${1}. We will continue without it."
return 1
fi
fi fi
setDialogBox "plain"
return 0 return 1
} }
runUserScripts() { runUserScripts() {