<commit_before>#!/usr/bin/env bash

srcdir="$(pwd)"
destdir="$HOME"

if [[ -d "$srcdir" ]]; then
  echo "Symlinking dotfiles from $srcdir"
else
  echo "$srcdir does not exist"
  exit 1
fi

link() {
  from="$1"
  to="$2"
  echo "Linking '$from' to '$to'"
  /bin/rm -rf "$to"
  ln --symbolic --relative --force "$from" "$to"
}

# Symlink dotfiles to home
for file in $(find "$srcdir/home" -name '.*' -depth 1); do
  link "$file" "$destdir/$(basename $file)"
done

# Symlink executables to bin
if [[ ! -d "$destdir/bin" ]]; then
  mkdir -p "$destdir/bin"
fi

for file in $(find "$srcdir/bin" -name '*' -depth 1); do
  link "$file" "$destdir/bin/$(basename $file)"
done
<commit_msg>Update copy function and dotfiles are not symlinking but copying to home directory<commit_after>#!/usr/bin/env bash

srcdir="$(pwd)"
destdir="$HOME"

if [[ -d "$srcdir" ]]; then
  echo "Copying dotfiles from $srcdir"
  echo "Symlinking bin executables from $srcdir"
else
  echo "$srcdir does not exist"
  exit 1
fi

copy() {
  from="$1"
  to="$2"
  echo "Copying '$from' to '$to'"
  /bin/rm -rf "$to"
  cp -rp "$from" "$to"
}

link() {
  from="$1"
  to="$2"
  echo "Linking '$from' to '$to'"
  /bin/rm -rf "$to"
  ln --symbolic --relative --force "$from" "$to"
}

# Copying dotfiles to home
for file in $(find "$srcdir/home" -name '.*' -depth 1); do
  copy "$file" "$destdir/$(basename $file)"
done

# Symlink executables to bin
if [[ ! -d "$destdir/bin" ]]; then
  mkdir -p "$destdir/bin"
fi

for file in $(find "$srcdir/bin" -name '*' -depth 1); do
  link "$file" "$destdir/bin/$(basename $file)"
done

{'fraction_non_alphanumeric': 0.19848293299620734, 'fraction_numerical': 0.007585335018963337, 'mean_word_length': 3.50997150997151, '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': '1585176', 'n_tokens_mistral': 629, 'n_tokens_neox': 622, 'n_words': 199}