<commit_before>#!/bin/bash
#
# Install all the dotfiles on system
#
# Uses rcm (https://github.com/thoughtbot/rcm)
#

if [ `uname` == "Darwin" ]
then
    OS="osx"
else
    OS="unknown"
fi

. rcrc

function install_rcm {
    case "$OS" in
        osx)
            brew tap thoughtbot/formulae
            brew install rcm
            ;;
        *)
            echo "OS $OS not supported; aborting;" && exit 1
            ;;
    esac
}

function has_rcm {
    [ `which rcup` ]
}

function run_rcup {
    cd "$HOME" && rcup -t $OS -x ${EXCLUDES// / -x }
}

function install_antigen() {
    git clone https://github.com/zsh-users/antigen.git "$HOME/.antigen"
}

function has_antigen() {
    [ -d "$HOME/.antigen" ]
}

has_rcm || install_rcm
has_antigen || install_antigen
run_rcup<commit_msg>Create dotfiles dir symlink<commit_after>#!/bin/bash
#
# Install all the dotfiles on system
#
# Uses rcm (https://github.com/thoughtbot/rcm)
#

if [ `uname` == "Darwin" ]
then
    OS="osx"
else
    OS="unknown"
fi

. rcrc

function install_rcm {
    case "$OS" in
        osx)
            brew tap thoughtbot/formulae
            brew install rcm
            ;;
        *)
            echo "OS $OS not supported; aborting;" && exit 1
            ;;
    esac
}

function has_rcm {
    [ `which rcup` ]
}

function run_rcup {
    cd "$HOME" && rcup -t $OS -x ${EXCLUDES// / -x }
}

function install_antigen() {
    git clone https://github.com/zsh-users/antigen.git "$HOME/.antigen"
}

function has_antigen() {
    [ -d "$HOME/.antigen" ]
}

function create_symlink() {
    ln -snf "$PWD" "$HOME/.dotfiles"
}

has_rcm || install_rcm
has_antigen || install_antigen
create_symlink
run_rcup
{'fraction_non_alphanumeric': 0.14046622833233713, 'fraction_numerical': 0.001195457262402869, 'mean_word_length': 2.301775147928994, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '851390', 'n_tokens_mistral': 635, 'n_tokens_neox': 618, 'n_words': 147}