#!/bin/bash
#system upgrade
sudo pacman -Syu
# install pikaur
sudo pacman -S --needed base-devel git
cd /home/$USER/
git clone https://aur.archlinux.org/pikaur.git
cd /home/$USER/pikaur/
makepkg -fsri
#enable multilib
sudo sed -i 's/#\[multilib\]/\[multilib\]\nInclude = \/etc\/pacman.d\/mirrorlist/' /etc/pacman.conf
pikaur -Syu
#install programms
cd /home/$USER/.dotfiles/
pikaur -S --needed --noconfirm - < pkglist.txt
#install vs code extensions
cd /home/$USER/.dotfiles/
cat code-extensions.txt | while read extension || [[ -n $extension ]];
do
    code --install-extension $extension --force
done

#pip install
cd /home/$USER/.dotfiles
pip install -r ./pip-modules.txt

echo "Manually STOW the configs!"
