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