From 34d0121e7f90a4c56210cfe71d0d0fd2f6632e89 Mon Sep 17 00:00:00 2001 From: stevefoxru <53931856+stevefoxru@users.noreply.github.com> Date: Tue, 22 Apr 2025 14:37:56 +0300 Subject: [PATCH] Update install.sh --- install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 401008a..ba4f4be 100644 --- a/install.sh +++ b/install.sh @@ -105,9 +105,13 @@ install_and_configure_needrestart() { # Клонирование репозитория clone_repository() { - if [[ -d "amnezia-bot" ]]; then cd amnezia-bot; return; fi + # Если скрипт запущен внутри клонированного репозитория, пропускаем + if [[ -d ".git" ]]; then + echo -e "${YELLOW}Репозиторий уже присутствует, пропускаем клонирование...${NC}" + return + fi run_with_spinner "Клонирование репозитория" "git clone https://github.com/stevefoxru/amnezia-bot.git -q" - cd amnezia-bot + cd amnezia-bot || { echo -e "${RED}Не удалось перейти в каталог amnezia-bot${NC}"; exit 1; } } # Настройка виртуального окружения