summaryrefslogtreecommitdiff
path: root/setup.sh
blob: 4d49764a9d6643bec9d7f03664d760a5cef2eaee (plain)
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
28
29
30
31
32
#!/bin/sh

set -e

if ! test "$1" = yesiknow ; then
  echo "This script will override configuration files in \$HOME"
  echo ""
  echo "Including your \$HOME/.bash_aliases_local"
  echo ""
  echo "If you know what you're doing, run with a parameter"
  echo "   $0 yesiknow"
  echo ""
fi

# If there is a ".bash_aliases" file, rename it.
# otherwise - create it
if test -e $HOME/.bash_aliases ; then
    mv $HOME/.bash_aliases $HOME/.bash_aliases_local
else
    echo "# Store machine-specific aliases here." > $HOME/.bash_aliases_local
fi

for i in emacs vimrc gitconfig tmux.conf bash_aliases ; do
   ln -sf $PWD/$i $HOME/.$i
done

# For linux, setup inputrc as well

case $(uname) in
   Linux) ln -sf $PWD/inputrc-unix $HOME/.inputrc
          ;;
esac