<commit_before>#!/bin/sh

VERSION=${VERSION:="1.0.0"}
echo "Using '$VERSION' version of the generator tool"

TEMPLATE=${TEMPLATE:="`pwd`/image.yaml"}
echo "Using '$TEMPLATE' template"

if [ ! -f "$TEMPLATE" ]; then
    echo "Cannot find '$TEMPLATE' template, make sure the file exists, aborting."
    exit 1
fi

# If SCRIPTS_DIR env variable is not provided,
# check if the default location (currentdir/scripts)
# exists, if yes, assume that this is the scripts
# directory to mount
if [ -z "$SCRIPTS_DIR" ] && [ -d "`pwd`/scripts" ]; then
    SCRIPTS_DIR=${SCRIPTS_DIR:="`pwd`/scripts"}
fi

OUTPUT_DIR=${OUTPUT_DIR:="`pwd`/target"}
echo "Using '$OUTPUT_DIR' as the output directory"

# Pre-create the target directory
mkdir -p $OUTPUT_DIR

cmd="/input/image.yaml /output"
volumes="-v $TEMPLATE:/input/image.yaml:z -v $OUTPUT_DIR:/output:z"

if [ -n "$SCRIPTS_DIR" ]; then
    echo "Using '$SCRIPTS_DIR' as the scripts directory"
    volumes="$volumes -v $SCRIPTS_DIR:/scripts:z"
    cmd="--scripts /scripts $cmd"
fi

if [ -z "$DIST_GIT" ]; then
    cmd="--dist-git $cmd"
fi

exec docker run -t --rm $volumes ce-registry.usersys.redhat.com/jboss/dogen:$VERSION $cmd
<commit_msg>Wrong switch<commit_after>#!/bin/sh

VERSION=${VERSION:="1.0.0"}
echo "Using '$VERSION' version of the generator tool"

TEMPLATE=${TEMPLATE:="`pwd`/image.yaml"}
echo "Using '$TEMPLATE' template"

if [ ! -f "$TEMPLATE" ]; then
    echo "Cannot find '$TEMPLATE' template, make sure the file exists, aborting."
    exit 1
fi

# If SCRIPTS_DIR env variable is not provided,
# check if the default location (currentdir/scripts)
# exists, if yes, assume that this is the scripts
# directory to mount
if [ -z "$SCRIPTS_DIR" ] && [ -d "`pwd`/scripts" ]; then
    SCRIPTS_DIR=${SCRIPTS_DIR:="`pwd`/scripts"}
fi

OUTPUT_DIR=${OUTPUT_DIR:="`pwd`/target"}
echo "Using '$OUTPUT_DIR' as the output directory"

# Pre-create the target directory
mkdir -p $OUTPUT_DIR

cmd="/input/image.yaml /output"
volumes="-v $TEMPLATE:/input/image.yaml:z -v $OUTPUT_DIR:/output:z"

if [ -n "$SCRIPTS_DIR" ]; then
    echo "Using '$SCRIPTS_DIR' as the scripts directory"
    volumes="$volumes -v $SCRIPTS_DIR:/scripts:z"
    cmd="--scripts /scripts $cmd"
fi

if [ -n "$DIST_GIT" ]; then
    cmd="--dist-git $cmd"
fi

exec docker run -t --rm $volumes ce-registry.usersys.redhat.com/jboss/dogen:$VERSION $cmd

{'fraction_non_alphanumeric': 0.1613588110403397, 'fraction_numerical': 0.003397027600849257, 'mean_word_length': 4.330316742081448, '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': '703259', 'n_tokens_mistral': 873, 'n_tokens_neox': 862, 'n_words': 243}