improved error handling

This commit is contained in:
Luke 2017-10-05 20:18:56 -07:00
parent d9d9a6c6d5
commit 10c94b9a9f

View file

@ -18,9 +18,9 @@ else
blue Now installing $arg... blue Now installing $arg...
if [[ -e /usr/bin/packer ]] if [[ -e /usr/bin/packer ]]
then then
(packer --noconfirm -S $arg && printf "${BLUE}\n$arg now installed.\n${NC}") || red Error installing $arg. (packer --noconfirm -S $arg && blue $arg now installed) || red Error installing $arg.
else else
(aurinstall $arg && printf "${BLUE}\n$arg now installed.\n${NC}") || red Error installing $arg. (aurinstall $arg && blue $arg now installed) || red Error installing $arg.
fi fi
fi fi
@ -48,16 +48,13 @@ for choice in $choices
do do
case $choice in case $choice in
1) 1)
printf "\n${BLUE}Now installing LaTeX packages...\n${NC}"
aurcheck vim-live-latex-preview aurcheck vim-live-latex-preview
git clone https://github.com/lukesmithxyz/latex-templates.git && mkdir -p /home/$USER/Documents/LaTeX && rsync -va latex-templates /home/$USER/Documents/LaTeX && rm -rf latex-templates git clone https://github.com/lukesmithxyz/latex-templates.git && mkdir -p /home/$USER/Documents/LaTeX && rsync -va latex-templates /home/$USER/Documents/LaTeX && rm -rf latex-templates
;; ;;
6) 6)
printf "\n${BLUE}Now installing extra fonts...\n${NC}"
aurcheck ttf-ancient-fonts aurcheck ttf-ancient-fonts
;; ;;
7) 7)
printf "\n${BLUE}Now installing transmission-remote-cli...\n${NC}"
aurcheck transmission-remote-cli-git aurcheck transmission-remote-cli-git
;; ;;
esac esac
@ -67,12 +64,10 @@ for choice in $browsers
do do
case $choice in case $choice in
3) 3)
printf "\n${BLUE}Now installing Palemoon...\n${NC}"
$ gpg --recv-keys 865E6C87C65285EC $ gpg --recv-keys 865E6C87C65285EC
aurcheck palemoon-bin aurcheck palemoon-bin
;; ;;
4) 4)
printf "\n${BLUE}Now installing Waterfox...\n${NC}"
aurcheck waterfox-bin aurcheck waterfox-bin
;; ;;
esac esac