<commit_before>#!/bin/bash

chchef() {
  if [[ -z "$1" ]]; then
    echo "Usage: chchef [init] NAME"
    return
  fi
  case "$1" in
  init)
    name=$2
    mkdir -p ~/.chef/$name
    mv ~/.chef/knife.rb ~/.chef/$name/knife.rb
    mv ~/.chef/${USER}.pem ~/.chef/$name/${USER}.pem
    if [[ -f ~/.chef/$name-validator.pem ]]; then
      mv ~/.chef/$name-validator.pem ~/.chef/$name/$name-validator.pem
    fi
    chchef $name
    ;;
  *)
    name=$1

    if [[ -d ~/.chef/$1 ]]; then
      rm -f ~/.chef/knife.rb ~/.chef/${USER}.pem ~/.chef/${name}-validator.pem
      ln -s ~/.chef/$name/knife.rb ~/.chef/knife.rb
      ln -s ~/.chef/$name/${USER}.pem ~/.chef/${USER}.pem

      if [[ -f ~/.chef/$name/$name-validator.pem ]]; then
        ln -s ~/.chef/$name/$name-validator.pem ~/.chef/$name-validator.pem
      fi
    else
      echo "No such file or directory: ~/.chef/$1"
      return
    fi

    ;;
  esac
}<commit_msg>Fix shellcheck warnings<commit_after>#!/bin/bash

chchef() {
  if [[ -z "$1" ]]; then
    echo "Usage: chchef [init] NAME"
    return
  fi
  case "$1" in
  init)
    name=$2
    mkdir -p "$HOME/.chef/$name"
    mv "$HOME/.chef/knife.rb" "$HOME/.chef/$name/knife.rb"
    mv "$HOME/.chef/${USER}.pem" "$HOME/.chef/$name/${USER}.pem"
    if [[ -f $HOME/.chef/$name-validator.pem ]]; then
      mv "$HOME/.chef/$name-validator.pem" "$HOME/.chef/$name/$name-validator.pem"
    fi
    chchef "$name"
    ;;
  *)
    name=$1

    if [[ -d $HOME/.chef/$1 ]]; then
      rm -f "$HOME/.chef/knife.rb" "$HOME/.chef/${USER}.pem" "$HOME/.chef/${name}-validator.pem"
      ln -s "$HOME/.chef/$name/knife.rb" "$HOME/.chef/knife.rb"
      ln -s "$HOME/.chef/$name/${USER}.pem" "$HOME/.chef/${USER}.pem"

      if [[ -f "$HOME/.chef/$name/$name-validator.pem" ]]; then
        ln -s "$HOME/.chef/$name/$name-validator.pem" "$HOME/.chef/$name-validator.pem"
      fi
    else
      echo "No such file or directory: $HOME/.chef/$1"
      return
    fi

    ;;
  esac
}
{'fraction_non_alphanumeric': 0.23225152129817445, 'fraction_numerical': 0.006085192697768763, 'mean_word_length': 2.0589147286821707, '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': '4190105', 'n_tokens_mistral': 834, 'n_tokens_neox': 828, 'n_words': 152}