<commit_before>#!/usr/bin/env sh

prefs="$HOME/.prefs"
repos="https://github.com/jimzhan/dotfiles.git"

# to error out
warn() {
  echo "$1" >&2
}

die() {
  warn "$1"
  exit 1
}

lnif() {
  if [ ! -e $2 ] ; then
    ln -s $1 $2
  fi
}

echo "Setting up preferences...\n"

if [ ! -e $prefs/.git ]; then
  echo "Cloning preferences\n"
  git clone $repos $prefs
else
  echo "Updating preferences\n"
  cd $prefs && git pull
fi

# zsh
echo "Setting up zsh...\n"
curl -L http://install.ohmyz.sh | sh
lnif $prefs/zshrc $HOME/.zshrc

# vim
echo "Setting up vim...\n"
curl http://j.mp/spf13-vim3 -L -o - | sh
lnif $prefs/vimrc.local $HOME/.vimrc.local
lnif $prefs/gvimrc.local $HOME/.gvimrc.local

# emacs
echo "Setting up emacs...\n"
lnif $prefs/emacs    $HOME/.emacs
lnif $prefs/emacs.d  $HOME/.emacs.d

# dev
echo "Setting up dev tools...\n"
lnif $prefs/hg       $HOME/.hg
lnif $prefs/hgrc     $HOME/.hgrc
lnif $prefs/gitconfig $HOME/.gitconfig
lnif $prefs/gitignore_global $HOME/.gitignore_global<commit_msg>update installation paths<commit_after>#!/usr/bin/env sh

prefs="$HOME/.dotfiles"
repos="https://github.com/jimzhan/dotfiles.git"

# to error out
warn() {
  echo "$1" >&2
}

die() {
  warn "$1"
  exit 1
}

lnif() {
  if [ ! -e $2 ] ; then
    ln -s $1 $2
  fi
}

echo "Setting up preferences...\n"

if [ ! -e $prefs/.git ]; then
  echo "Cloning preferences\n"
  git clone $repos $prefs
else
  echo "Updating preferences\n"
  cd $prefs && git pull
fi

# zsh
echo "Setting up zsh...\n"
curl -L http://install.ohmyz.sh | sh
lnif $prefs/zshrc $HOME/.zshrc

# vim
echo "Setting up editors...\n"
curl http://j.mp/spf13-vim3 -L -o - | sh
lnif $prefs/vimrc.local $HOME/.vimrc.local
lnif $prefs/gvimrc.local $HOME/.gvimrc.local
lnif $prefs/emacs    $HOME/.emacs
lnif $prefs/emacs.d  $HOME/.emacs.d

# dev
echo "Setting up dev tools...\n"
lnif $prefs/hg               $HOME/.hg
lnif $prefs/hgrc             $HOME/.hgrc
lnif $prefs/gitconfig        $HOME/.gitconfig
lnif $prefs/gitignore_global $HOME/.gitignore_global
{'fraction_non_alphanumeric': 0.17064676616915422, 'fraction_numerical': 0.009950248756218905, 'mean_word_length': 2.787193973634652, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1937166', 'n_tokens_mistral': 880, 'n_tokens_neox': 839, 'n_words': 210}