aboutsummaryrefslogblamecommitdiff
path: root/bootstrap.sh
blob: 7742d5b71baae782a6165cc4b3538a8c7e156bc7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                   
 
                              


                                



                               



                                            
             



































                                                                                                                                                                           
#!/usr/bin/env bash

SYMLINKDIR=$(readlink -f "$0")
BASEDIR=$(dirname "$SYMLINKDIR")
cd $BASEDIR

if [ -f /etc/os-release ]; then
  . /etc/os-release
  OS=$NAME
fi

read -p "Install dependencies? (y/n) " -n 1;
echo "";
if [[ $REPLY =~ ^[Yy]$ ]]; then
  case $OS in
    arch)
      sudo pacman -S picom xorg-setxkbmap feh xorg-xinput dash imlib2 xorg-xsetroot alacritty flameshot rofi xorg-xbacklight pamixer playerctl xsecurelock git base rsync 
      ;;
    void)
      sudo xbps-install -S picom xorg-setxkbmap feh xorg-xinput dash imlib2 xorg-xsetroot alacritty flameshot rofi xorg-xbacklight pamixer playerctl xsecurelock git rsync 
      ;;
    *)
      echo "You'll have to install the dependencies yourself"
      ;;
  esac

fi;

git pull origin main;

function doIt() {
	git clone https://github.com/NvChad/NvChad.git ~/.config/nvim
 	rsync --exclude ".git/" \
		--exclude ".DS_Store" \
		--exclude ".osx" \
		--exclude "bootstrap.sh" \
		--exclude "README.md" \
		--exclude "LICENSE.md" \
		-avh --no-perms ./.config/ ~/.config
}

if [ "$1" == "--force" -o "$1" == "-f" ]; then
	doIt;
else
	read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1;
	echo "";
	if [[ $REPLY =~ ^[Yy]$ ]]; then
		doIt;
	fi;
fi;
unset doIt;