summaryrefslogtreecommitdiff
path: root/make-symlinks
blob: 02adaf4e3b99c820fe68f3ac66f971f06f3b5b66 (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
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh

set -e

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


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


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

files="
    abcde.conf
    bash_profile
    bashrc
    emacs 
    git-global-ignore
    mailcap
    people.json
    profile
    screenrc
    signature
    signature-codethink
    taskrc
    vimrc
    xsessionrc
"

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