]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - setup.sh
setup.sh: If rxvt is installed remove a xterm "fix".
[config/dotfiles.git] / setup.sh
1 #!/bin/sh
2
3 # Setup script for shell configuration files.
4
5
6 . ../lib.sh
7
8 hostname=`hostname`
9
10 # Generate ~/.less with lesskey.
11 lesskey lesskey
12 chmod 0600 ~/.less
13
14 # As screen-256color is not widely supported use it only on machines known to
15 # work.
16 generate cat screenrc .in
17 if [ $hostname != asp -a $hostname != systemofadown ]; then
18     sed 's/Enable 256 color/Disable 256 color/;
19          s/screen-256color/screen/' screenrc > screenrc.tmp
20     mv screenrc.tmp screenrc
21 fi
22 # I use some features of screen which are only in Git. Drop them on machines
23 # which have older versions. They are marked as "(GIT)".
24 if [ $hostname != asp ]; then
25     grep -v '(GIT)' screenrc > screenrc.tmp
26     mv screenrc.tmp screenrc
27 fi
28 # Rxvt doesn't need the attrcolor "fix". As I prefer rxvt assume I use it when
29 # it's installed.
30 if installed rxvt; then
31     sed 's/attrcolor b ".I"/#attrcolor b ".I"/' screenrc > screenrc.tmp
32     mv screenrc.tmp screenrc
33 fi
34
35 # Link setup for shells.
36 link shell ~/.shell
37 link bash ~/.bash
38 link bash/rc ~/.bashrc
39 link bash/profile ~/.bash_profile
40 link bash/logout ~/.bash_logout
41 link zsh ~/.zsh
42 link zsh/env ~/.zshenv
43 link zsh/rc ~/.zshrc
44 link zsh/logout ~/.zlogout
45
46 # Link setup for additional files.
47 if installed colordiff; then
48     link colordiffrc ~/.colordiffrc
49 fi
50 link inputrc ~/.inputrc
51 link screenrc ~/.screenrc