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

# so we can have fancy stuff like !(pattern)
shopt -s extglob

dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"

library="$dir/../library"
src="$dir/src"
logs="$dir/logs"
namespaces='library stackbrew'
docker='docker'

library="$(readlink -f "$library")"
src="$(readlink -f "$src")"
logs="$(readlink -f "$logs")"

usage() {
	cat <<EOUSAGE

usage: $0 [build|push] [options] [repo[:tag] ...]
   ie: $0 build --all
       $0 push debian ubuntu:12.04

   This script builds or pushes the Docker images specified using the Git
   repositories specified in the library files in the namespaces.

common options:
  --help, -h, -?     Print this help message
  --all              Builds all Docker repos specified in library
  --library="$library"
                     Where to find repository manifest files
  --namespaces="$namespaces"
                     Space separated list of namespaces to tag images in after
                     building
  --docker="$docker"
                     Use a custom Docker binary.

build options:
  --no-clone         Don't pull the Git repos
  --no-build         Don't build, just echo what would have built
  --src="$src"
                     Where to store the cloned Git repositories
  --logs="$logs"
                     Where to store the build logs

push options:
  --no-push          Don't actually push the images to the Docker Hub

EOUSAGE
}

# which subcommand
subcommand=$1
case "$subcommand" in
	build|push)
		shift
		;;
	*)
		{
			echo "error: unknown subcommand: $1"
			usage
		} >&2
		exit 1
		;;
esac<commit_msg>Fix usage ordering, logs are now common to build and push<commit_after>#!/bin/bash
set -e

# so we can have fancy stuff like !(pattern)
shopt -s extglob

dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"

library="$dir/../library"
src="$dir/src"
logs="$dir/logs"
namespaces='library stackbrew'
docker='docker'

library="$(readlink -f "$library")"
src="$(readlink -f "$src")"
logs="$(readlink -f "$logs")"

usage() {
	cat <<EOUSAGE

usage: $0 [build|push] [options] [repo[:tag] ...]
   ie: $0 build --all
       $0 push debian ubuntu:12.04

   This script builds or pushes the Docker images specified using the Git
   repositories specified in the library files in the namespaces.

common options:
  --all              Builds all Docker repos specified in library
  --docker="$docker"
                     Use a custom Docker binary.
  --help, -h, -?     Print this help message
  --library="$library"
                     Where to find repository manifest files
  --logs="$logs"
                     Where to store the build logs
  --namespaces="$namespaces"
                     Space separated list of namespaces to tag images in after
                     building

build options:
  --no-build         Don't build, just echo what would have built
  --no-clone         Don't pull the Git repos
  --src="$src"
                     Where to store the cloned Git repositories

push options:
  --no-push          Don't actually push the images to the Docker Hub

EOUSAGE
}

# which subcommand
subcommand=$1
case "$subcommand" in
	build|push)
		shift
		;;
	*)
		{
			echo "error: unknown subcommand: $1"
			usage
		} >&2
		exit 1
		;;
esac
{'fraction_non_alphanumeric': 0.11810291382517049, 'fraction_numerical': 0.006819590824550527, 'mean_word_length': 2.4076029567053854, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '6470051', 'n_tokens_mistral': 1022, 'n_tokens_neox': 927, 'n_words': 357}