diff --git a/Scripts/install.sh b/Scripts/install.sh index ae7f0c3..699ba4c 100755 --- a/Scripts/install.sh +++ b/Scripts/install.sh @@ -40,6 +40,22 @@ install_yay() { done } +clone_repo() { + print_section "Клонирование репозитория" + git clone https://github.com/retrilzzy/dotfiles.git "$DOTFILES_DIR" || true +} + +setup_pacman() { + print_section "Настройка Pacman" + + sudo cp /etc/pacman.conf /etc/pacman.conf.bak 2>/dev/null + sudo cp "$DOTFILES_DIR/Configs/etc/pacman.conf" /etc/pacman.conf + + sudo pacman -Syu --noconfirm + + echo -e "${GREEN}Настройка Pacman завершена${RESET}" +} + ensure_yay() { if ! command -v yay &>/dev/null; then print_section "Установка AUR помощника yay" @@ -96,12 +112,6 @@ backup_configs() { echo -e "${GREEN}Бэкап сохранён в $backup_dir${RESET}" } -clone_repo() { - print_section "Клонирование репозитория" - - git clone https://github.com/retrilzzy/dotfiles.git "$DOTFILES_DIR" || true -} - apply_new_configs() { print_section "Применение новых конфигураций" @@ -162,6 +172,10 @@ main() { print_section "Git" install_pacman git + clone_repo + + setup_pacman + ensure_yay print_section "Сетевые инструменты"