My zsh configuration
git clone https://github.com/m-col/zshrc
Files | Refs | Readme

-rwxr-xr-x install


      1 #!/usr/bin/env bash
      2 
      3 dir=$(dirname "$(readlink -f "$0")")
      4 cd $dir
      5 
      6 # source this zshrc from ~/.zshrc
      7 if [[ -f ~/.zshrc ]]
      8 then
      9 	backup=~/.zshrc_$(date +%m%d-%H%M%S)
     10 	mv ~/.zshrc $backup
     11 	echo "Moved pre-existing ~/.zshrc to $backup"
     12 fi
     13 echo "source $dir/zshrc" > $HOME/.zshrc
     14 echo "Created new ~/.zshrc to source this repo"
     15 
     16 
     17 # if installation didn't include submodules they need installing
     18 git submodule init
     19 git submodule update
     20 
     21 
     22 # inform if zsh is not yet installed
     23 if ! type zsh 2> /dev/null
     24 then
     25     echo "zsh is not installed on this system."
     26 fi
     27 
     28 
     29 # symlink ranger config
     30 mkdir -p $HOME/.config/ranger
     31 ln -s $dir/rc.conf $HOME/.config/ranger/rc.conf
     32