<commit_before>#!/bin/bash
############################
# .make.sh
# This script creates symlinks from the home directory to any desired dotfiles in ~/dotfiles
############################

set -u # Prevent unset variables
set -e # Stop on an error

########## Variables

border="====="
dotfiles=$HOME/dotfiles               # dotfiles directory
olddir=$HOME/dotfiles_old             # old dotfiles backup directory
# list of files/folders to symlink in homedir
files="vimrc vim zshrc bashrc general aliases grep nodejs path
    tmux.conf gitconfig gitignore_global ackrc ctags jshintrc irssi"

##########

# Remove everything in dotfiles_old
rm -rf $olddir

# create dotfiles_old in homedir
echo "Creating $olddir for backup of any existing dotfiles in $HOME"
mkdir -p $olddir
echo "...done"

# move any existing dotfiles in homedir to dotfiles_old directory, then create symlinks
echo "Moving any existing dotfiles from $HOME to $olddir"
for file in $files; do
  oldfile="$HOME/.$file"
  if [ -f $oldfile ]; then
      mv $oldfile $olddir
  fi
  echo "Creating symlink to $file in home directory."
  echo "$dotfiles/$file - $HOME/.$file"
  ln -s "$dotfiles/$file" "$HOME/.$file"
done
<commit_msg>Update formatting of comments in makesymlinks.sh.<commit_after>#!/bin/bash
############################
# .make.sh
# This script creates symlinks from the home directory to any desired dotfiles
# in ~/dotfiles
############################

set -u # Prevent unset variables
set -e # Stop on an error

########## Variables

border="====="
dotfiles=$HOME/dotfiles               # dotfiles directory
olddir=$HOME/dotfiles_old             # old dotfiles backup directory
# list of files/folders to symlink in homedir
files="vimrc vim zshrc bashrc general aliases grep nodejs path
    tmux.conf gitconfig gitignore_global ackrc ctags jshintrc irssi"

##########

# Remove everything in dotfiles_old
rm -rf $olddir

# create dotfiles_old in homedir
echo "Creating $olddir for backup of any existing dotfiles in $HOME"
mkdir -p $olddir
echo "...done"

# move any existing dotfiles in homedir to dotfiles_old directory, then create
# symlinks
echo "Moving any existing dotfiles from $HOME to $olddir"
for file in $files; do
  oldfile="$HOME/.$file"
  if [ -f $oldfile ]; then
      mv $oldfile $olddir
  fi
  echo "Creating symlink to $file in home directory."
  echo "$dotfiles/$file - $HOME/.$file"
  ln -s "$dotfiles/$file" "$HOME/.$file"
done

{'fraction_non_alphanumeric': 0.1477832512315271, 'fraction_numerical': 0.0, 'mean_word_length': 4.01440329218107, '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': '1596822', 'n_tokens_mistral': 759, 'n_tokens_neox': 739, 'n_words': 281}