From 971a4083ff14f20b300952dfdb5f78181784596d Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Fri, 7 Mar 2025 16:17:39 +0900 Subject: [PATCH] updated --- auto-install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/auto-install.sh b/auto-install.sh index fb9cfd3..6defa40 100644 --- a/auto-install.sh +++ b/auto-install.sh @@ -6,16 +6,18 @@ Github_URL="https://github.com/JaKooLit/$Distro.git" Distro_DIR="$HOME/$Distro" printf "\n%.0s" {1..1} -# Package GIT + if ! command -v git &> /dev/null then echo "Git not found! Installing Git..." - sudo pacman -S --no-confirm git + if ! sudo pacman -S --no-confirm git; then + echo "Failed to install Git. Exiting." + exit 1 + fi fi printf "\n%.0s" {1..1} -# Check if the repository already exists if [ -d "$Distro_DIR" ]; then echo "$Distro_DIR exists. Updating the repository..." cd "$Distro_DIR" @@ -28,4 +30,4 @@ else cd "$Distro_DIR" chmod +x install.sh ./install.sh -fi \ No newline at end of file +fi