From 10600e6e8359b5eb1e5f67a9ce73d4b5a705bf27 Mon Sep 17 00:00:00 2001 From: Botspot <54716352+Botspot@users.noreply.github.com> Date: Mon, 8 Feb 2021 17:40:39 -0600 Subject: [PATCH] install script install git --- install | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/install b/install index c80e845..890a46f 100755 --- a/install +++ b/install @@ -12,15 +12,29 @@ if ! command -v yad >/dev/null;then if [ -f /usr/bin/apt ];then sudo apt update sudo apt install -y yad + updated=1 elif [ -f /usr/bin/pacman ];then sudo pacman -S yad else - error "Failed to find any package manager" + error "Failed to find any package manager to install yad." fi fi #remove annoying YAD icon browser launcher sudo rm -f /usr/share/applications/yad-icon-browser.desktop +#install git +if ! command -v git >/dev/null;then + if [ -f /usr/bin/apt ];then + #only run sudo apt update if not already run + if [ -z "$updated" ];then + sudo apt update + fi + sudo apt install -y git + else + error "Failed to find any package manager to install git." + fi +fi + #download pi-apps if folder missing if [ -z "$DIRECTORY" ] || [ "$DIRECTORY" == "$HOME" ] || [ "$DIRECTORY" == bash ];then DIRECTORY="$HOME/pi-apps"