<commit_before>#!/bin/bash

# loosley based on code form http://ypereirareis.github.io/

NORMAL="\\033[0;39m"ø
RED="\\033[1;31m"
BLUE="\\033[1;34m"

CONTAINER_NAME='haxeflixel-docker-00'
IMAGE_NAME='haxeflixel-docker'

if [ -z "$*" ]; then
    echo "This script contains utilities for working with the haxeflixel-docker image."
    echo "You need to provide at least one command for this script:"
    echo "   > shell - Run the docker container and enter a bash shell."
    echo "   > run - Run the docker container $CONTAINER_NAME detached, and remove any previous one."
    echo "   > build-image - Build the docker image $IMAGE_NAME."
    echo "   > build-demos - Build the haxeflixel demos to a server folder in the cwd."
fi

log() {
  echo -e "$BLUE > $1 $NORMAL"
}

error() {
  echo ""
  echo -e "$RED >>> ERROR - $1$NORMAL"
}

build-image() {
  log "Building the Dockerfile to an image called $IMAGE_NAME"
  docker build -t $IMAGE_NAME . 
  
  [ $? != 0 ] && error "Failed to build docker image $IMAGE_NAME" && exit 100
}

build-demos() {<commit_msg>(test) remove bash error handling line.<commit_after>#!/bin/bash

# loosley based on code form http://ypereirareis.github.io/

NORMAL="\\033[0;39m"ø
RED="\\033[1;31m"
BLUE="\\033[1;34m"

CONTAINER_NAME='haxeflixel-docker-00'
IMAGE_NAME='haxeflixel-docker'

if [ -z "$*" ]; then
    echo "This script contains utilities for working with the haxeflixel-docker image."
    echo "You need to provide at least one command for this script:"
    echo "   > shell - Run the docker container and enter a bash shell."
    echo "   > run - Run the docker container $CONTAINER_NAME detached, and remove any previous one."
    echo "   > build-image - Build the docker image $IMAGE_NAME."
    echo "   > build-demos - Build the haxeflixel demos to a server folder in the cwd."
fi

log() {
  echo -e "$BLUE > $1 $NORMAL"
}

error() {
  echo ""
  echo -e "$RED >>> ERROR - $1$NORMAL"
}

build-image() {
  log "Building the Dockerfile to an image called $IMAGE_NAME"
  docker build -t $IMAGE_NAME .
}

build-demos() {
{'fraction_non_alphanumeric': 0.13022351797862003, 'fraction_numerical': 0.023323615160349854, 'mean_word_length': 3.3165618448637315, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '4378415', 'n_tokens_mistral': 762, 'n_tokens_neox': 706, 'n_words': 237}