<commit_before>#!/bin/bash

echo "Starting Serubin's dotfile install..."
# Get current dir (so run this script from anywhere)
export DOTFILES_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# saves dotfile location
echo "export DOTFILES_DIR=${DOTFILES_DIR}" > $HOME/.dotfiles_loc

# Get *nix distro
DISTRO_RAW="" # Gets raw os output
if [ -r "/etc/*-release" ]; then
	DISTRO_RAW=$(cat /etc/*-release)
else
	DISTRO_RAW=$(uname)
fi
# Parses out specific distro
DISTRO=`echo $DISTRO_RAW | perl -lne '/(Ubuntu)|(Debian)|(Darwin)/gi && print $&' | head -n1`
unset DISTRO_RAW # unsets util var

# Update dotfiles itself first - 
[ -d "$DOTFILES_DIR/.git" ] && git --work-tree="$DOTFILES_DIR" --git-dir="$DOTFILES_DIR/.git" pull origin master

# Backing up current configurations
echo "Moving previous configurations to dotfiles/bak/"
mkdir $HOME/.dotfiles-bak

if [ -r "$HOME/.bash_profile" ]; then
	mv $HOME/.bash_profile $HOME/.dotfiles-bak/
fi

if [ -r "$HOME/.bashrc" ]; then
	mv $HOME/.bashrc $HOME/.dotfiles-bak/
fi

if [ -r "$HOME/.inputrc" ]; then
	mv $HOME/.inputrc $HOME/.dotfiles-bak/
fi

echo "Creating symlinks"
# Bunch of symlinks
ln -sfv "$DOTFILES_DIR/runcom/.bashrc" ~<commit_msg>Possible fix for unsupported os error (still on issue #4, sorta)<commit_after>#!/bin/bash

echo "Starting Serubin's dotfile install..."
# Get current dir (so run this script from anywhere)
export DOTFILES_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# saves dotfile location
echo "export DOTFILES_DIR=${DOTFILES_DIR}" > $HOME/.dotfiles_loc

# Get *nix distro
DISTRO_RAW="" # Gets raw os output
DISTRO_RAW_LOC=`echo /etc/*-release`
if [ -r "$DISTRO_RAW_LOC" ]; then
	DISTRO_RAW=$(cat /etc/*-release)
else
	DISTRO_RAW=$(uname)
fi
# Parses out specific distro
DISTRO=`echo $DISTRO_RAW | perl -lne '/(Ubuntu)|(Debian)|(Darwin)/gi && print $&' | head -n1`
unset DISTRO_RAW # unsets util var

# Update dotfiles itself first - 
[ -d "$DOTFILES_DIR/.git" ] && git --work-tree="$DOTFILES_DIR" --git-dir="$DOTFILES_DIR/.git" pull origin master

# Backing up current configurations
echo "Moving previous configurations to dotfiles/bak/"
mkdir $HOME/.dotfiles-bak

if [ -r "$HOME/.bash_profile" ]; then
	mv $HOME/.bash_profile $HOME/.dotfiles-bak/
fi

if [ -r "$HOME/.bashrc" ]; then
	mv $HOME/.bashrc $HOME/.dotfiles-bak/
fi

if [ -r "$HOME/.inputrc" ]; then
	mv $HOME/.inputrc $HOME/.dotfiles-bak/
fi

echo "Creating symlinks"
# Bunch of symlinks
ln -sfv "$DOTFILES_DIR/runcom/.bashrc" ~
{'fraction_non_alphanumeric': 0.16392125351546805, 'fraction_numerical': 0.002008838891120932, 'mean_word_length': 4.264270613107822, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1109479', 'n_tokens_mistral': 984, 'n_tokens_neox': 900, 'n_words': 250}