From f1532c0b2e61478c74f1bd8da8e4c4b50c653d8e Mon Sep 17 00:00:00 2001 From: nnduc Date: Tue, 31 Mar 2026 23:37:21 +0700 Subject: [PATCH] strip version and ignore not found packages --- install-packages.sh | 14 ++++- packages.txt | 144 ++++++++++++++++++++++---------------------- 2 files changed, 85 insertions(+), 73 deletions(-) diff --git a/install-packages.sh b/install-packages.sh index b116b7b..334922b 100644 --- a/install-packages.sh +++ b/install-packages.sh @@ -20,4 +20,16 @@ if [[ ${#packages[@]} -eq 0 ]]; then fi echo "Installing ${#packages[@]} packages..." -sudo pacman -S --needed "${packages[@]}" +skipped=() +for pkg in "${packages[@]}"; do + if pacman -Si "$pkg" &>/dev/null || pacman -Sg "$pkg" &>/dev/null; then + sudo pacman -S --needed --noconfirm "$pkg" + else + echo "Skipping '$pkg': not found in repositories" + skipped+=("$pkg") + fi +done + +if [[ ${#skipped[@]} -gt 0 ]]; then + echo "Skipped ${#skipped[@]} package(s): ${skipped[*]}" +fi diff --git a/packages.txt b/packages.txt index a4780e7..5e820e9 100644 --- a/packages.txt +++ b/packages.txt @@ -1,72 +1,72 @@ -alacritty 0.16.1-1 -base 3-3 -bind 9.20.19-1 -blueman 2.4.6-2 -bluez-utils 5.86-2 -brave-bin 1:1.87.192-1 -calibre 8.7.0-9 -cronie 1.7.2-2 -cuda 13.1.1-1 -docker 1:29.2.1-1 -docker-compose 5.0.2-1 -extra-cmake-modules 6.23.0-1 -fastfetch 2.59.0-1 -fcitx5-configtool 5.1.12-2 -fcitx5-gtk 5.1.5-1 -feh 3.11.2-2 -firefox 147.0.4-1 -flameshot 13.3.0-2 -fuse2 2.9.9-5 -fzf 0.70.0-1 -gparted 1.8.1-1 -grub-btrfs 4.14-1 -htop 3.4.1-1 -inkscape 1.4.3-2 -intel-ucode 20260210-1 -kbibtex 1:0.10.0-10 -kodi 21.3-3 -krita 5.2.15-1 -libreoffice-still 25.8.5-1 -linux-zen 6.19.9.zen1-1 -masterpdfeditor 5.9.94-1 -masterpdfeditor-debug 5.9.94-1 -mousepad 0.6.5-1 -neovim 0.11.6-1 -net-tools 2.10-3 -network-manager-applet 1.36.0-1 -nvidia-open-dkms 590.48.01-4 -okular 25.12.2-1 -openbsd-netcat 1.234_1-1 -partitionmanager 25.12.3-1 -paru 2.1.0-2 -paru-debug 2.1.0-2 -pasystray 0.8.2-2 -plasma-meta 6.6-1 -playerctl 2.4.1-5 -polybar 3.7.2-2 -pyright 1.1.407-1 -python-uv 0.10.12-1 -qt6-wayland 6.10.2-1 -ranger 1.9.4-5 -rsync 3.4.1-2 -rust-analyzer 20260202-1 -sddm 0.21.0-6 -signal-desktop 7.90.0-1 -snap-pac 3.0.1-3 -sof-firmware 2025.12.2-1 -steam 1.0.0.85-3 -strawberry 1.2.18-1 -swaybg 1.2.1-1 -swayidle 1.9.0-1 -swaylock 1.8.4-1 -syncthing 2.0.14-1 -texlive-langother 2025.2-3 -texlive-meta 2025.2-3 -thunderbird 147.0.1-1 -unbound 1.24.2-2 -vala 0.56.18-5 -vlc 3.0.21-32 -wireguard-tools 1.0.20260223-1 -xfce4-terminal 1.1.5-2 -xorg-xinput 1.6.4-2 -zram-generator 1.2.1-1 +alacritty +base +bind +blueman +bluez-utils +brave-bin +calibre +cronie +cuda +docker +docker-compose +extra-cmake-modules +fastfetch +fcitx5-configtool +fcitx5-gtk +feh +firefox +flameshot +fuse2 +fzf +gparted +grub-btrfs +htop +inkscape +intel-ucode +kbibtex +kodi +krita +libreoffice-still +linux-zen +masterpdfeditor +masterpdfeditor-debug +mousepad +neovim +net-tools +network-manager-applet +nvidia-open-dkms +okular +openbsd-netcat +partitionmanager +paru +paru-debug +pasystray +plasma-meta +playerctl +polybar +pyright +python-uv +qt6-wayland +ranger +rsync +rust-analyzer +sddm +signal-desktop +snap-pac +sof-firmware +steam +strawberry +swaybg +swayidle +swaylock +syncthing +texlive-langother +texlive-meta +thunderbird +unbound +vala +vlc +wireguard-tools +xfce4-terminal +xorg-xinput +zram-generator