citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

setup_env.sh (715B)


      1 #!/usr/bin/env sh
      2 OHMY=.oh-my-zsh
      3 OLD=/tmp/old
      4 
      5 if [ ! -d $OLD ]; then
      6   mkdir $OLD
      7 fi
      8 
      9 # set up symlinks
     10 echo "Creating sym links..."
     11 
     12 FILES=`ls -a | grep "^\." \
     13   | sed \
     14       -e "1,2d" \
     15       -e "/\.git$/d" \
     16       -e "/\.gitmodules$/d" \
     17 `
     18 
     19 for FILE in $FILES
     20 do
     21   DEST=$HOME/$FILE
     22   if [ -e $DEST ]; then
     23     mv $DEST $OLD/$FILE
     24   fi
     25   ln -sf `pwd`/$FILE $HOME/$FILE
     26 done
     27 
     28 # install vim config
     29 echo "Installing vim config..."
     30 ln -sf $HOME/.vim/.vimrc $HOME/.vimrc
     31 
     32 # install zsh config
     33 echo "Installing zsh config..."
     34 if [ -d $HOME/$OHMY ]; then
     35   mv $HOME/$OHMY $OLD/$OHMY
     36 fi
     37 
     38 git clone http://github.com/robbyrussell/oh-my-zsh.git $HOME/$OHMY
     39 ln -sf `pwd`/jb55.zsh-theme $HOME/$OHMY/themes/jb55.zsh-theme