summaryrefslogtreecommitdiff
path: root/setup.sh
blob: c5be270bfa3abdd398ffa213c0e4b6ad04010ea3 (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
48
49
50
51
52
#!env zsh

symlink () 
{
  for i in `find . -maxdepth 1 -type d | grep -v .git | sed "s|./||" | grep -v by_os | grep -v "^\.$"`; do
    stow -t $HOME $i
  done
}

DIRS=(.config           \
      .newsboat         \
      .moc              \
      .mozilla/firefox  \
      .vim              \
      .mutt/tmp         \
      .ssh              \
      )
DIRS_Linux=(.ncftp   \
            .urxvt
            )

for i in $DIRS; do
  rm -f $HOME/$i
  mkdir -p $HOME/$i
done

if [[ $(uname) == "Linux" ]]; then
  ln -s /tmp/pks/.cache $HOME
  for i in $DIRS_Linux; do
    rm $HOME/$i
    mkdir -p $HOME/$i
  done
fi

if [[ $(uname) == "Darwin" ]]; then
  ln -s "$HOME/.mozilla/firefox" "$HOME/.mozilla/ $HOME/Library/Application Support/Firefox"
fi

symlink
cd by_os/$(uname); symlink

git submodule update --init --recursive
if [[ $(uname) == "Linux" ]]; then
  cd $HOME/.urxvt;
  ln -s urxvt-font-size/font-size .
  ln -s urxvt-perls/keyboard-select .
  ln -s urxvt-perls/deprecated/clipboard .
  ln -s urxvt-perls/deprecated/url-select .
  ln -s urxvt-tabbedex/tabbedex .
fi