larbs

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 0a40c3ff553876a5c20dc80fbb7baae2595bbcc5
parent 55983e6c9f4cfcbd70dc9d921c65dc4cf0a49360
Author: Luke <luke@lukesmith.xyz>
Date:   Wed,  4 Oct 2017 15:09:55 -0700

Removing redundent AUR installs

Diffstat:
Aaurinstall.sh | 18++++++++++++++++++
Muser.sh | 19++++++++++++++-----
2 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/aurinstall.sh b/aurinstall.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +qm=$(pacman -Qm | awk '{print $1}') + +instcheck() { +if [[ $qm = *"$1"* ]]; then + echo $1 already installed. +else + aurinstall $1 +fi +} +instcheck $1 + +#for prog in "$@" +#do + #(pacman -Qm | grep $prog ) || echo "not" +#done + diff --git a/user.sh b/user.sh @@ -14,12 +14,21 @@ pulseaudio --start printf "${BLUE}Installing packer as an AUR manager...\n${NC}" aurinstall() { curl -O https://aur.archlinux.org/cgit/aur.git/snapshot/$1.tar.gz && tar -xvf $1.tar.gz && cd $1 && makepkg --noconfirm -si && cd .. && rm -rf $1 $1.tar.gz ;} +qm=$(pacman -Qm | awk '{print $1}') -aurinstall packer || (echo "Error installing packer." >> LARBS.log && error) +aurcheck() { +if [[ $qm = *"$1"* ]]; then + echo $1 already installed. +else + aurinstall $1 +fi +;} + +aurcheck packer || (echo "Error installing packer." >> LARBS.log && error) printf "${BLUE}Installing AUR programs...\n${NC}" printf "${BLUE}(May take some time.)\n${NC}" -packer --noconfirm -S i3-gaps vim-pathogen neofetch i3lock tamzen-font-git neomutt unclutter-xfixes-git urxvt-resize-font-git polybar-git python-pywal xfce-theme-blackbird || (echo "Error installing AUR packages. Check your internet connections and pacman keys." >> LARBS.log && error) +aurcheck i3-gaps vim-pathogen neofetch i3lock tamzen-font-git neomutt unclutter-xfixes-git urxvt-resize-font-git polybar-git python-pywal xfce-theme-blackbird || (echo "Error installing AUR packages. Check your internet connections and pacman keys." >> LARBS.log && error) #packer --noconfirm -S ncpamixer-git speedometer cli-visualizer choices=$(cat choices) for choice in $choices @@ -27,15 +36,15 @@ do case $choice in 1) printf "\n${BLUE}Now installing LaTeX packages...\n${NC}" - packer --noconfirm -S vim-live-latex-preview + aurcheck vim-live-latex-preview ;; 6) printf "\n${BLUE}Now installing extra fonts...\n${NC}" - pacman --noconfirm --needed -S ttf-ancient-fonts + aurcheck ttf-ancient-fonts ;; 7) printf "\n${BLUE}Now installing transmission-remote-cli...\n${NC}" - packer --noconfirm -S transmission-remote-cli-git + aurcheck transmission-remote-cli-git ;; esac done