<commit_before>#!/bin/bash
set -e

INSTALL_BASE="/opt/dims"

# If there was a path specified, use that instead of the default
if [ ! "$1" == "" ]; then
   INSTALL_BASE="$1"
fi

JAR_PATH="$INSTALL_BASE/jars/tupelo"

echo "Installing to $INSTALL_BASE"

if [ -d "$JAR_PATH" ]; then
    echo "Existing jar path found, removing"
    rm -rf "$JAR_PATH"
fi

# Copy all the jars and properties into the lib folder
mkdir -p "$JAR_PATH"

cp target/*.jar "$JAR_PATH"
# Copy any properties, ignoring errors
cp target/*.properties "$JAR_PATH" 2> /dev/null || :

cp *.properties "$JAR_PATH" 2> /dev/null || :

# Copy the elvis script into the bin folder
mkdir -p "$INSTALL_BASE/bin"
cp elvis "$INSTALL_BASE/bin"

# Set permissions
# Don't use recursive changes, be explicit
# Make sure the directories have +rx
chmod a+rx "$INSTALL_BASE"
chmod a+rx "$INSTALL_BASE/bin"
chmod a+rx "$JAR_PATH/../"
chmod a+rx "$JAR_PATH"
# Make sure the elvis script has +x
chmod a+x "$INSTALL_BASE/bin/elvis"

echo "Installed to $INSTALL_BASE"
echo "Add '$INSTALL_BASE/bin' to your path"

<commit_msg>Remove old jars instead of the directory<commit_after>#!/bin/bash
set -e

INSTALL_BASE="/opt/dims"

# If there was a path specified, use that instead of the default
if [ ! "$1" == "" ]; then
   INSTALL_BASE="$1"
fi

JAR_PATH="$INSTALL_BASE/jars/tupelo"

echo "Installing to $INSTALL_BASE"

if [ -d "$JAR_PATH" ]; then
    echo "Existing jar path found, cleaning"
    rm -f "$JAR_PATH/*"
fi

# Copy all the jars and properties into the lib folder
mkdir -p "$JAR_PATH"

cp target/*.jar "$JAR_PATH"
# Copy any properties, ignoring errors
cp target/*.properties "$JAR_PATH" 2> /dev/null || :

cp *.properties "$JAR_PATH" 2> /dev/null || :

# Copy the elvis script into the bin folder
mkdir -p "$INSTALL_BASE/bin"
cp elvis "$INSTALL_BASE/bin"

# Set permissions
# Don't use recursive changes, be explicit
# Make sure the directories have +rx
chmod a+rx "$INSTALL_BASE"
chmod a+rx "$INSTALL_BASE/bin"
chmod a+rx "$JAR_PATH/../"
chmod a+rx "$JAR_PATH"
# Make sure the elvis script has +x
chmod a+x "$INSTALL_BASE/bin/elvis"

echo "Installed to $INSTALL_BASE"
echo "Add '$INSTALL_BASE/bin' to your path"


{'fraction_non_alphanumeric': 0.1329639889196676, 'fraction_numerical': 0.003693444136657433, 'mean_word_length': 4.234299516908212, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '318258', 'n_tokens_mistral': 815, 'n_tokens_neox': 768, 'n_words': 268}