summaryrefslogtreecommitdiff
path: root/make-symlinks
blob: 3fecd13b90258807a82d78f4b1ad75be6561f5bf (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
33
34
35
#!/bin/sh

set -e

die()
{
    echo "$@" 1>&2
    exit 1
}


abspath()
{
    (cd "$1" && pwd)
}


dirname=$(abspath $(dirname "$0"))
echo "$dirname"

files="bashrc bash_profile profile xsessionrc vimrc muttrc mailcap emacs 
    signature signature-codethink git-global-ignore"

for x in $files
do
    [ -e "$dirname/$x" ] || die "$dirname/$x does not exist, oops"
#    [ ! -L "$HOME/.$x" ] || die "$HOME/.$x is already a symlink, oops"
done

for x in $files
do
    ln -sf "$dirname/$x" "$HOME/.$x"
done

ln -sf "$dirname/xmonad.hs" "$HOME/.xmonad/xmonad.hs"