1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/bin/bash if [[ $EUID -eq 0 ]]; then echo "This script must not be run as root" exit 1 fi # Install system packages packages=( "ripgrep" "xclip" "ctags" ) for package in "${packages[@]}"; do if ! pacman -Qi "$package" > /dev/null 2>&1; then sudo pacman -S --noconfirm "$package" fi done