comparison setup.sh @ 170:95e349996727

Add a script for setting up the shell environment on a naked home. Use a global .hgrc that has a hook for local includes per machine.
author Dirk Olmes <dirk.olmes@codedo.de>
date Sat, 04 Apr 2020 03:53:18 +0200
parents
children efce15db2915
comparison
equal deleted inserted replaced
169:2cc8820caae0 170:95e349996727
1 #!/bin/bash
2 #
3 # setup the shell env on a new, naked host
4 #
5 cd $HOME
6
7 replace_with_link() {
8 local target="$1"
9 local source="$2"
10
11 if [[ -f $target ]]; then
12 rm $target
13 fi
14 ln -s $source $target
15 }
16
17 replace_with_link .zshrc .zsh-env/zshrc
18 replace_with_link .hgrc .zsh-env/hgrc
19 replace_with_link .nanorc .zsh-env/.nanorc
20 replace_with_link .screenrc .zsh-env/.screenrc