summaryrefslogtreecommitdiffstats
path: root/install
blob: 8d8b31aef1853243ca62b2054f2d0a3f6d75a7c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/sh

DEST_DIR=$HOME/bin

rm *~
for f in *; do
    [ "$f" == "install" ] && continue
    ff=$(readlink -f $f)
    if [ ! -e $DEST_DIR/$f ]; then
        echo "symlink $DEST_DIR/$f" && ln -s $ff $DEST_DIR/$f
    else
        bf=$(readlink -e $DEST_DIR/$f)
        if [ "$bf" != "$ff" ]; then
            echo "$bf is not OK"
        fi
    fi
done