<commit_before>#!/bin/bash
#
# Downloads and runs Google closure compiler.
# Guide: https://google.github.io/styleguide/shell.xml
# Link: https://developers.google.com/closure/compiler/
# Source: https://github.com/Datamart/Workspace/blob/master/build/jsmin.sh

readonly CWD=$(cd $(dirname $0); pwd)
readonly LIB="${CWD}/lib"
readonly TMP="${CWD}/tmp"

# TODO(user): Replace to project related path.
readonly JS_COMPILED="${CWD}/../min/komito.js"
readonly JS_SOURCES="${CWD}/../src"

readonly JS_COMPILER_ZIP="compiler-latest.zip"
readonly JS_COMPILER_URL="http://dl.google.com/closure-compiler/${JS_COMPILER_ZIP}"
readonly JS_COMPILER_JAR="${LIB}/compiler.jar"

readonly WGET="$(which wget)"
readonly CURL="$(which curl)"
readonly PYTHON="$(which python)"
readonly JAVA="$(which java)"
readonly UNZIP="$(which unzip)"
# Hot fix for clean installation of OS X El Capitan.
readonly JAVA_OSX="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java"

readonly LICENSE="/* @license http://www.apache.org/licenses/LICENSE-2.0 */"
readonly NEW_LINE=$'\n'


#
# Downloads closure compiler.
#
function download() {
  if [[ ! -f "${JS_COMPILER_JAR}" ]]; then
    echo "Downloading closure compiler:"
    mkdir -p "${LIB}"
    rm -rf "${TMP}" && mkdir "${TMP}" && cd "${TMP}"
    if [[ -n "$WGET" ]]; then<commit_msg>Updated closure compiler URL<commit_after>#!/bin/bash
#
# Downloads and runs Google closure compiler.
# Guide: https://google.github.io/styleguide/shell.xml
# Link: https://developers.google.com/closure/compiler/
# Source: https://github.com/Datamart/Workspace/blob/master/build/jsmin.sh

readonly CWD=$(cd $(dirname $0); pwd)
readonly LIB="${CWD}/lib"
readonly TMP="${CWD}/tmp"

# TODO(user): Replace to project related path.
readonly JS_COMPILED="${CWD}/../min/komito.js"
readonly JS_SOURCES="${CWD}/../src"

# readonly JS_COMPILER_ZIP="compiler-latest.zip"
readonly JS_COMPILER_ZIP="compiler-20200204.zip"
readonly JS_COMPILER_URL="https://dl.google.com/closure-compiler/${JS_COMPILER_ZIP}"
readonly JS_COMPILER_JAR="${LIB}/compiler.jar"

readonly WGET="$(which wget)"
readonly CURL="$(which curl)"
readonly PYTHON="$(which python)"
readonly JAVA="$(which java)"
readonly UNZIP="$(which unzip)"
# Hot fix for clean installation of OS X El Capitan.
readonly JAVA_OSX="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java"

readonly LICENSE="/* @license http://www.apache.org/licenses/LICENSE-2.0 */"
readonly NEW_LINE=$'\n'


#
# Downloads closure compiler.
#
function download() {
  if [[ ! -f "${JS_COMPILER_JAR}" ]]; then
    echo "Downloading closure compiler:"
    mkdir -p "${LIB}"
    rm -rf "${TMP}" && mkdir "${TMP}" && cd "${TMP}"
    if [[ -n "$WGET" ]]; then
{'fraction_non_alphanumeric': 0.18094887826406766, 'fraction_numerical': 0.0051489518205222505, 'mean_word_length': 5.085011185682327, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1013648', 'n_tokens_mistral': 977, 'n_tokens_neox': 917, 'n_words': 202}