<commit_before>#!/bin/bash

DOTFILES=$(dirname $0)

backup() {
  if [ -f $1 ]; then
    if [ ! -h $1 ]; then
      cp $1 $1.orig
    fi
    rm $1
  fi
}

conditional_clone() {
  if [ ! -d $2 ]; then
    git clone $1 $2
  fi
}

####################################
############### BASH ###############
####################################

backup ~/.bashrc
ln -s $DOTFILES/bashrc ~/.bashrc

####################################
############### ZSH ################
####################################

conditional_clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
conditional_clone git://github.com/tarruda/zsh-autosuggestions ~/.zsh-autosuggestions

backup ~/.zshrc<commit_msg>Fixed relative paths problem.<commit_after>#!/bin/bash

DOTFILES=$(dirname $0)
if [[ $DOTFILES != /* ]]; then
  if [ $DOTFILES == "." ]; then
    DOTFILES=$(pwd)
  else
    DOTFILES=$(pwd)/$DOTFILES
  fi
fi

backup() {
  if [ -f $1 ] && [ ! -h $1 ]; then
    cp $1 $1.orig
  fi
  if [ -f $1 ] || [ -h $1 ]; then
    rm $1
  fi
}

conditional_clone() {
  if [ ! -d $2 ]; then
    git clone $1 $2
  fi
}

####################################
############### BASH ###############
####################################

backup ~/.bashrc
ln -s $DOTFILES/bashrc ~/.bashrc
echo $DOTFILES

####################################
############### ZSH ################
####################################

conditional_clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
conditional_clone git://github.com/tarruda/zsh-autosuggestions ~/.zsh-autosuggestions

backup ~/.zshrc
{'fraction_non_alphanumeric': 0.39269698910954515, 'fraction_numerical': 0.012812299807815503, 'mean_word_length': 3.8359133126934983, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '2426238', 'n_tokens_mistral': 561, 'n_tokens_neox': 531, 'n_words': 109}