<commit_before>#!/bin/bash
# Temporary shell script to run bunch of scripts

__error=''
__error_code=0

## Create symlinks to all dotfiles defined here under home directory
echo "Creating symlinks to git installed dotfiles..."
find ${PWD}/dotfiles \
    -maxdepth 1 -mindepth 1 \
    ! \( \
    -name .git -o \
    -name README.md -o \
    -name setup.sh -o \
    -name .DS_Store \) \
    -exec ln -s {} ~/ \; 2> /tmp/dotfiles_setup.log

## Handle errors
__error=$(</tmp/dotfiles_setup.log)
if [ ! -z "$__error" ]; then
    __error_code=1
    echo "Error: there was some error occurred while creating symlinks"
    cat /tmp/dotfiles_setup.log
    echo ""
else
    echo "Operation completed"
    echo ""
fi
rm /tmp/dotfiles_setup.log

exit $__error_code
<commit_msg>Add force option to update symlinks<commit_after>#!/bin/bash
# Temporary shell script to run bunch of scripts
__error=''
__error_code=0
# Current implementation only assumes one possible argument of -f
exec_command='ln -s'
if [ ! -z $1 ] && [ $1 == '-f' ]; then
  exec_command='ln -sf'
fi

## Create symlinks to all dotfiles defined here under home directory
echo "Creating symlinks to git installed dotfiles..."
find ${PWD}/dotfiles \
    -maxdepth 1 -mindepth 1 \
    ! \( -name .git -o \
      -name README.md -o \
      -name .DS_Store \) \
    -exec $exec_command {} ~ \; 2> /tmp/dotfiles_setup.log

## Handle errors
__error=$(</tmp/dotfiles_setup.log)
if [ ! -z "$__error" ]; then
    __error_code=1
    echo "Error: there was some error occurred while creating symlinks"
    cat /tmp/dotfiles_setup.log
    echo ""
else
    echo "Operation completed"
    echo ""
fi
rm /tmp/dotfiles_setup.log

exit $__error_code

{'fraction_non_alphanumeric': 0.12462908011869436, 'fraction_numerical': 0.007121661721068249, 'mean_word_length': 2.93006993006993, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '740662', 'n_tokens_mistral': 574, 'n_tokens_neox': 569, 'n_words': 183}