<commit_before>#!/bin/sh
set -e

DOTFILE_DIR=${DOTFILE_DIR:-"$HOME/.dotfiles"}

# dotfiles
if [ ! -d "$DOTFILE_DIR" ]; then
  echo "installing dotfiles"
  git clone "https://github.com/hecticjeff/dotfiles" "$DOTFILE_DIR"
else
  cd "$DOTFILE_DIR"
  git pull origin master
fi

# oh-my-zsh
# if there is a symlink there, remove it
if [ -L "$HOME/.oh-my-zsh" ]; then
  rm ~/.oh-my-zsh
fi

if [ ! -d "$HOME/.oh-my-zsh" ]; then
  echo "installing oh-my-zsh"
  git clone "https://github.com/robbyrussell/oh-my-zsh" ~/.oh-my-zsh
  ln -s "$DOTFILE_DIR/zsh" "$HOME/.oh-my-zsh/custom/plugins"
fi

# janus
if [ ! -f "$HOME/.vim/README.markdown" ]; then
  echo "installing janus"
  for i in ~/.vim ~/.vimrc ~/.gvimrc; do [ -e $i ] && mv $i $i.old; done
  git clone "https://github.com/hecticjeff/janus" ~/.vim
fi

# upgrade
. "$DOTFILE_DIR/upgrade.sh"<commit_msg>force symlink<commit_after>#!/bin/sh
set -e

DOTFILE_DIR=${DOTFILE_DIR:-"$HOME/.dotfiles"}

# dotfiles
if [ ! -d "$DOTFILE_DIR" ]; then
  echo "installing dotfiles"
  git clone "https://github.com/hecticjeff/dotfiles" "$DOTFILE_DIR"
else
  cd "$DOTFILE_DIR"
  git pull origin master
fi

# oh-my-zsh
# if there is a symlink there, remove it
if [ -L "$HOME/.oh-my-zsh" ]; then
  rm ~/.oh-my-zsh
fi

if [ ! -d "$HOME/.oh-my-zsh" ]; then
  echo "installing oh-my-zsh"
  git clone "https://github.com/robbyrussell/oh-my-zsh" ~/.oh-my-zsh
fi

ln -nfs "$DOTFILE_DIR/zsh" "$HOME/.oh-my-zsh/custom/plugins"
ln -nfs "$DOTFILE_DIR/zsh/hecticjeff.zsh-theme" "$HOME/.oh-my-zsh/themes/hecticjeff.zsh-theme"

# janus
if [ ! -f "$HOME/.vim/README.markdown" ]; then
  echo "installing janus"
  for i in ~/.vim ~/.vimrc ~/.gvimrc; do [ -e $i ] && mv $i $i.old; done
  git clone "https://github.com/hecticjeff/janus" ~/.vim
fi

# upgrade
. "$DOTFILE_DIR/upgrade.sh"
{'fraction_non_alphanumeric': 0.1920935412026726, 'fraction_numerical': 0.0, 'mean_word_length': 3.2382075471698113, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '2695498', 'n_tokens_mistral': 790, 'n_tokens_neox': 789, 'n_words': 172}