#!/bin/zsh -x 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 \ .newsbeuter \ .moc \ .vim \ .mutt/tmp ) DIRS_Linux=(.mozilla \ .ncftp \ .urxvt ) for i in $DIRS; do rm $HOME/$i mkdir -p $HOME/$i done if [[ $(uname) == "Linux" ]]; then for i in $DIRS_Linux; do rm $HOME/$i mkdir -p $HOME/$i done fi symlink cd by_os/$(uname); symlink git submodule update --init --recursive if [[ $(uname) == "Linux" ]]; then cd $HOME/.urxvt; ln -s urxvt-perls/clipboard . ln -s urxvt-perls/keyboard-select . ln -s urxvt-tabbedex/tabbedex . ln -s urxvt-perls/url-select . fi