#! /bin/sh
#
# clone_and_link.sh
# Copyright (C) 2016 fabian <fabian@fabi-laptop-arch>
#
# Distributed under terms of the MIT license.
#

sudo pacman --needed -Sy archlinux-keyring --noconfirm
sudo pacman --needed -Syu --noconfirm
sudo pacman --needed -Sy base-devel xorg xorg-xinit gnome gnome-extra neovim zsh tmux openssh alacritty powerline powerline-fonts python-pip --noconfirm
pip3 install neovim
./clone_and_link.sh
cp zsh/.powerline_config_arch.example zsh/.powerline_config
cp vim/.vimrc_config_powerline_arch.example vim/.vimrc_config_powerline 
./copy_fonts_arch.sh
if [ $SHELL != "/bin/zsh" ]; then
    chsh -s /usr/bin/zsh;
fi

for filename in zsh/.*_arch.example; do
    cp $filename ${filename:0:-13}
done

for filename in tmux/.*_arch.example; do
    cp $filename ${filename:0:-13}
done

for filename in vim/.*_arch.example; do
    cp $filename ${filename:0:-13}
done
