From d583b524d6299747120dbf06d5d8e8bf9b7d35c3 Mon Sep 17 00:00:00 2001 From: Adrien Bouvais Date: Wed, 8 Oct 2025 06:45:27 +0000 Subject: [PATCH] Simplify install.sh --- install.sh | 46 ++++++++++++++-------------------------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/install.sh b/install.sh index 7160ef8..f7904a6 100755 --- a/install.sh +++ b/install.sh @@ -2,25 +2,18 @@ set -e -echo "--- Installing essential pacman packages ---" sudo pacman -S --noconfirm --needed \ + niri \ base-devel \ git \ lazygit \ starship -if ! command -v yay &> /dev/null; then - echo "--- yay not found, installing... ---" - git clone https://aur.archlinux.org/yay.git /tmp/yay - (cd /tmp/yay && makepkg -si --noconfirm) - rm -rf /tmp/yay -else - echo "--- yay is already installed. ---" -fi +git clone https://aur.archlinux.org/yay.git /tmp/yay +(cd /tmp/yay && makepkg -si --noconfirm) +rm -rf /tmp/yay -echo "--- Installing AUR and official repository packages with yay ---" yay -S --noconfirm --needed \ - niri \ swayidle \ swaylock-effects \ waybar \ @@ -28,30 +21,19 @@ yay -S --noconfirm --needed \ wlogout \ ttf-firacode-nerd \ neovim \ - htop \ - nvtop \ yazi \ firefox -echo "--- Copying configuration files from ~/Dotfiles ---" -if [ -d "$HOME/Dotfiles" ]; then - cp -r "$HOME/Dotfiles/.config/"* "$HOME/.config/" - - cp "$HOME/Dotfiles/.bashrc" "$HOME/.bashrc" - - mkdir -p "$HOME/wallpapers" - cp -r "$HOME/Dotfiles/wallpapers/"* "$HOME/wallpapers/" -else - echo "WARNING: ~/Dotfiles directory not found. Skipping config installation." -fi +mkdir -p "$HOME/tmp" +git clone https://git.bouvais.lu/adrien/Dotfiles "/tmp/dotfiles" --depth 1 + +cp -r "/tmp/dotfiles/.config/"* "$HOME/.config/" +cp "/tmp/dotfiles/.bashrc" "$HOME/.bashrc" +mkdir -p "$HOME/wallpapers" +cp -r "/tmp/dotfiles/wallpapers/"* "$HOME/wallpapers/" + +rm -rf /tmp/yay -echo "--- Configuring Git and SSH ---" git config --global user.name "adrien" git config --global user.email "git@bouvais.lu" - -if [ ! -f "$HOME/.ssh/id_rsa" ]; then - echo "--- Generating a new SSH key ---" - ssh-keygen -t rsa -b 4096 -C "git@bouvais.com" -f "$HOME/.ssh/id_rsa" -N "" -else - echo "--- SSH key already exists, skipping generation. ---" -fi \ No newline at end of file +ssh-keygen -t rsa -b 4096 -C "git@bouvais.com" -f "$HOME/.ssh/id_rsa" -N "" \ No newline at end of file