summaryrefslogblamecommitdiff
path: root/install
blob: 09e0a9c187c5cead1f8b2c7d849853ef7760425b (plain) (tree)
1
2
3
4
5
6
7
8
9







                                                                          
                                                           




                                                       
             

                           
  

                                   

  









                                                                                                            
#!/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 gitconfig gitignore Rprofile reportbugrc; 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

# git-prompt
if [ ! -e ~/.git-prompt.sh ]; then
  curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
fi

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

Contact - Imprint