<commit_before>#!/bin/bash

# Deployment script
# Copies the relevant scripts to $HOME/bin and sets their permissions

BIN_DIR=$HOME/bin

case "$1" in
  all)
    cp git-grep-blame.rb $BIN_DIR/ggb
    cp git-grep-filter.rb $BIN_DIR/ggf
    cp git_utils.rb $BIN_DIR/
    cp setup_cabal.sh $BIN_DIR/setup_cabal
    cp setup_haskell_sandboxes.rb $BIN_DIR/setup_haskell_sandboxes
    cd $BIN_DIR
    chmod 700 ggb ggf setup_cabal setup_haskell_sandboxes
    ;;

  git-grep-filter)
    cabal build git-grep-filter
    if [ $? -eq 0 ]
    then
      cp dist/build/git-grep-filter/git-grep-filter $BIN_DIR/ggf
      chmod 700 $BIN_DIR/ggf
    fi
    ;;

  *)
    echo "$0: Unknown target to deploy"
    exit 1
    ;;
esac
<commit_msg>deploy.sh - deploy Haskell version of git-grep-filter<commit_after>#!/bin/bash

# Deployment script
# Copies the relevant scripts to $HOME/bin and sets their permissions

BIN_DIR=$HOME/bin
BuildSuccess=0

case "$1" in
  all)
    ./build.sh git-grep-filter
    BuildSuccess=$?
    if [ $BuildSuccess -eq 0 ]
    then
      cp dist/build/git-grep-filter/git-grep-filter $BIN_DIR/ggf
      cp git-grep-blame.rb $BIN_DIR/ggb
      cp git_utils.rb $BIN_DIR/
      cp setup_cabal.sh $BIN_DIR/setup_cabal
      cp setup_haskell_sandboxes.rb $BIN_DIR/setup_haskell_sandboxes
      cd $BIN_DIR
      chmod 700 ggb ggf setup_cabal setup_haskell_sandboxes
    else
      echo "Deploy failed"
    fi
    ;;

  git-grep-filter)
    ./build.sh git-grep-filter
    if [ $? -eq 0 ]
    then
      cp dist/build/git-grep-filter/git-grep-filter $BIN_DIR/ggf
      chmod 700 $BIN_DIR/ggf
    fi
    ;;

  *)
    echo "$0: Unknown target to deploy"
    exit 1
    ;;
esac

{'fraction_non_alphanumeric': 0.10011918951132301, 'fraction_numerical': 0.013110846245530394, 'mean_word_length': 2.579957356076759, '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': '7162431', 'n_tokens_mistral': 691, 'n_tokens_neox': 641, 'n_words': 148}