diff --git a/distros.sh b/distros.sh index 5f6a460..b0c5754 100755 --- a/distros.sh +++ b/distros.sh @@ -428,6 +428,24 @@ update_package_list() { ubuntu | debian) run $_sudo apt-get update ;; fedora) run $_sudo dnf update ;; arch) + if command_exists pacman; then + if ! checkAUR; then + local paruBuildDir="/opt/builds" + local USER="$(whoami)" + $_sudo mkdir -p "$paruBuildDir" + # if ! command_exists paru; then + echo "${YELLOW}Installing paru as AUR helper...${NC}" + $_sudo pacman -S --needed --noconfirm base-devel git + cd "$paruBuildDir" && $_sudo git clone https://aur.archlinux.org/paru-bin.git paru + $_sudo chown -R "$USER": "$paruBuildDir/paru" + cd "$paruBuildDir/paru" && makepkg --noconfirm -si + echo "${GREEN}Paru installed${NC}" + # else + # printf "%b\n" "${GREEN}Paru already installed${RC}" + # fi + fi + fi + if command_exists paru; then run paru -Sy elif command_exists yay; then @@ -457,25 +475,6 @@ if check_env; then if [[ -z "$PIKA_INIT" ]]; then echo_pkg "First time being imported.." - if $arch; then - if command_exists pacman; then - if ! checkAUR; then - paruBuildDir="/opt/builds" - $_sudo mkdir -p "$paruBuildDir" - # if ! command_exists paru; then - echo "${YELLOW}Installing paru as AUR helper...${NC}" - $_sudo pacman -S --needed --noconfirm base-devel git - cd "$paruBuildDir" && $_sudo git clone https://aur.archlinux.org/paru-bin.git paru - $_sudo chown -R "$USER": "$paruBuildDir/paru" - cd "$paruBuildDir/paru" && makepkg --noconfirm -si - echo "${GREEN}Paru installed${NC}" - # else - # printf "%b\n" "${GREEN}Paru already installed${RC}" - # fi - fi - fi - fi - if update_package_list; then touch "$pikaCheckFile" fi