2017-10-05 18:28:56 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-10-07 21:22:14 +00:00
|
|
|
blue() { printf "\033[0;34m $* \033[0m\n" && (sudo echo $* >> LARBS.log) ;}
|
|
|
|
red() { printf "\033[0;31m $* \033[0m\n" && (sudo echo ERROR: $* >> LARBS.log) ;}
|
2017-10-05 18:28:56 +00:00
|
|
|
|
2017-10-06 00:36:14 +00:00
|
|
|
#Install an AUR package manually.
|
2017-10-05 18:28:56 +00:00
|
|
|
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 ;}
|
|
|
|
|
2017-10-06 00:36:14 +00:00
|
|
|
#aurcheck runs on each of its arguments, if the argument is not already installed, it either uses packer to install it, or installs it manually.
|
2017-10-05 18:28:56 +00:00
|
|
|
aurcheck() {
|
2017-10-06 00:36:14 +00:00
|
|
|
qm=$(pacman -Qm | awk '{print $1}')
|
2017-10-05 18:28:56 +00:00
|
|
|
for arg in "$@"
|
|
|
|
do
|
|
|
|
if [[ $qm = *"$arg"* ]]; then
|
|
|
|
echo $arg is already installed.
|
2017-10-06 00:36:14 +00:00
|
|
|
else
|
2017-10-05 18:28:56 +00:00
|
|
|
echo $arg not installed
|
2017-10-06 00:36:14 +00:00
|
|
|
blue Now installing $arg...
|
|
|
|
if [[ -e /usr/bin/packer ]]
|
|
|
|
then
|
2017-10-06 03:18:56 +00:00
|
|
|
(packer --noconfirm -S $arg && blue $arg now installed) || red Error installing $arg.
|
2017-10-06 00:36:14 +00:00
|
|
|
else
|
2017-10-06 03:18:56 +00:00
|
|
|
(aurinstall $arg && blue $arg now installed) || red Error installing $arg.
|
2017-10-06 00:36:14 +00:00
|
|
|
fi
|
|
|
|
|
2017-10-05 18:28:56 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2017-10-06 00:36:14 +00:00
|
|
|
blue Changing directory to /home/$USER...
|
|
|
|
cd /home/$USER || red Could not cd to /home/$USER. Does user and home directory exist?
|
|
|
|
|
|
|
|
blue Installing AUR programs...
|
|
|
|
|
|
|
|
blue \(This may take some time.\)
|
2017-10-05 18:28:56 +00:00
|
|
|
|
|
|
|
#Add the needed gpg key for neomutt
|
|
|
|
gpg --recv-keys 5FAF0A6EE7371805
|
|
|
|
|
2017-10-06 18:06:37 +00:00
|
|
|
aurcheck packer i3-gaps vim-pathogen neofetch tamzen-font-git neomutt unclutter-xfixes-git urxvt-resize-font-git polybar-git python-pywal xfce-theme-blackbird || red Error with basic AUR installations...
|
2017-10-06 00:36:14 +00:00
|
|
|
#Also installing i3lock, since i3-gaps was only just now installed.
|
2017-10-06 05:22:48 +00:00
|
|
|
sudo pacman -S --noconfirm --needed i3lock
|
2017-10-05 18:28:56 +00:00
|
|
|
|
|
|
|
#packer --noconfirm -S ncpamixer-git speedometer cli-visualizer
|
|
|
|
|
2017-10-06 05:03:23 +00:00
|
|
|
choices=$(cat .choices)
|
|
|
|
for choice in $choices
|
|
|
|
do
|
|
|
|
case $choice in
|
|
|
|
1)
|
|
|
|
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
|
|
|
|
;;
|
|
|
|
6)
|
|
|
|
aurcheck ttf-ancient-fonts
|
|
|
|
;;
|
|
|
|
7)
|
|
|
|
aurcheck transmission-remote-cli-git
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
browsers=$(cat .browch)
|
|
|
|
for choice in $browsers
|
|
|
|
do
|
|
|
|
case $choice in
|
|
|
|
3)
|
2017-10-06 05:22:48 +00:00
|
|
|
gpg --recv-keys 865E6C87C65285EC
|
2017-10-06 05:03:23 +00:00
|
|
|
aurcheck palemoon-bin
|
|
|
|
;;
|
|
|
|
4)
|
|
|
|
aurcheck waterfox-bin
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|