exit if yad installation fails

pull/373/head
Botspot 5 years ago committed by GitHub
parent 8763c8596c
commit 644bfe94c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,10 +11,8 @@ DIRECTORY="$(readlink -f "$(dirname "$0")")"
if ! command -v yad >/dev/null;then if ! command -v yad >/dev/null;then
if [ -f /usr/bin/apt ];then if [ -f /usr/bin/apt ];then
sudo apt update sudo apt update
sudo apt install -y yad sudo apt install -y yad || error "Failed to install yad."
updated=1 updated=1
elif [ -f /usr/bin/pacman ];then
sudo pacman -S yad
else else
error "Failed to find any package manager to install yad." error "Failed to find any package manager to install yad."
fi fi
@ -29,7 +27,7 @@ if ! command -v git >/dev/null;then
if [ -z "$updated" ];then if [ -z "$updated" ];then
sudo apt update sudo apt update
fi fi
sudo apt install -y git sudo apt install -y git || error "Failed to install git."
else else
error "Failed to find any package manager to install git." error "Failed to find any package manager to install git."
fi fi

Loading…
Cancel
Save