summaryrefslogtreecommitdiff
path: root/install
blob: bf69ac865e70c7285ccb48bb47dd73e7f1e27405 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# run this script as ./install as we set its working dir from $BASH_SOURCE
cd $(dirname $BASH_SOURCE)

# the path of the working dir
BASE=$(pwd)

# dotfiles to install
for dotfile in bashrc gitconfig gitignore Rprofile reportbugrc vimrc zshrc p10k.zsh; do
  mkdir -pv bak  
  [ -e ~/.$dotfile ] && mv -v ~/.$dotfile bak/.$dotfile
  ln -sfv $BASE/$dotfile ~/.$dotfile
done

# nvim config
if [ ! -e ~/.config ]; then
  mkdir -pv ~/.config
fi
if [ ! -e ~/.config/nvim ]; then
  ln -sfv $BASE/nvim ~/.config/nvim
fi

# scripts
mkdir -pv ~/.local/bin
for bin in $BASE/bin/*; do
  ln -svf $bin ~/.local/bin
done

Contact - Imprint