blob: 1ca34700424636cd453acfacf5b22993f230c508 (
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
|
#! /bin/sh
DEST_DIR=$HOME/bin
DONOTDO="install bashrc solarized xkb-jeyzu.patch"
rm *~ 2>/dev/null
for f in *; do
echo $DONOTDO | grep -q $f 2>/dev/null
[ $? -eq 0 ] && 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
for f in bashrc; do
ff=$(readlink -f $f)
dst="$HOME/.$f"
if [ ! -e "$dst" ]; then
echo "symlink $dst" && ln -s "$ff" "$dst"
else
bf=$(readlink -e "$dst")
if [ "$bf" != "$ff" ]; then
echo "$bf is not OK"
fi
fi
done
ff=$(readlink -f solarized/dircolors.ansi-dark)
dst=$HOME/.dir_colors
if [ ! -e "$dst" ]; then
echo "symlink $dst" && ln -s "$ff" "$dst"
else
bf=$(readlink -e "$dst")
if [ "$bf" != "$ff" ]; then
echo "$bf is not OK"
fi
fi
|