<commit_before>#!/usr/bin/env bash
## for now, just install the libs in /usr/local/lib and /Library/Java/Extensions
INSTALL_PREFIX="/usr/local"
EXTDIR="/Library/Java/Extensions"
LIBDIR="${INSTALL_PREFIX}/lib"
OLD_PWD="${PWD}"
OLD_UMASK="$(umask)"
WORKING="$(mktemp -d)"
VERSION="2018-01-12-450f3c9b459d128135abb5bbd4fa0508fe26bfae"
OSX_VERSION="10.13.2"
Z3_REPO_URL="https://github.com/batfish/z3"
Z3_ZIP_URL="${Z3_REPO_URL}/releases/download/z3-${VERSION}/z3-${VERSION}-x64-osx-${OSX_VERSION}.zip"
Z3_ZIP="$(basename "${Z3_ZIP_URL}")"
Z3_DIR="$(basename "${Z3_ZIP}" .zip)"
set -x
cd "${WORKING}" || exit 1
umask 0022 || exit 1
curl -L "${Z3_ZIP_URL}" -o "${Z3_ZIP}" || exit 1
unzip "${Z3_ZIP}" || exit 1
cd "${Z3_DIR}" || exit 1
mkdir -p "${LIBDIR}" "${EXTDIR}"
cp "bin/libz3.dylib" "bin/libz3java.dylib" "${LIBDIR}/" || exit 1
ln -s "${LIBDIR}/libz3.dylib" "${EXTDIR}/libz3.dylib"
ln -s "${LIBDIR}/libz3java.dylib" "${EXTDIR}/libz3java.dylib"
umask "${OLD_UMASK}" || exit 1
cd "${OLD_PWD}" || exit 1
rm -rf "${WORKING}" || exit 1

<commit_msg>Copy over z3 binary in the install script for osx (#877)<commit_after>#!/usr/bin/env bash
## for now, just install the libs in /usr/local/lib and /Library/Java/Extensions
INSTALL_PREFIX="/usr/local"
BINDIR="${INSTALL_PREFIX}/bin"
EXTDIR="/Library/Java/Extensions"
LIBDIR="${INSTALL_PREFIX}/lib"
OLD_PWD="${PWD}"
OLD_UMASK="$(umask)"
WORKING="$(mktemp -d)"
VERSION="2018-01-12-450f3c9b459d128135abb5bbd4fa0508fe26bfae"
OSX_VERSION="10.13.2"
Z3_REPO_URL="https://github.com/batfish/z3"
Z3_ZIP_URL="${Z3_REPO_URL}/releases/download/z3-${VERSION}/z3-${VERSION}-x64-osx-${OSX_VERSION}.zip"
Z3_ZIP="$(basename "${Z3_ZIP_URL}")"
Z3_DIR="$(basename "${Z3_ZIP}" .zip)"
set -x
cd "${WORKING}" || exit 1
umask 0022 || exit 1
curl -L "${Z3_ZIP_URL}" -o "${Z3_ZIP}" || exit 1
unzip "${Z3_ZIP}" || exit 1
cd "${Z3_DIR}" || exit 1
mkdir -p "${LIBDIR}" "${EXTDIR}" "${BINDIR}"
cp "bin/libz3.dylib" "bin/libz3java.dylib" "${LIBDIR}/" || exit 1
ln -s "${LIBDIR}/libz3.dylib" "${EXTDIR}/libz3.dylib"
ln -s "${LIBDIR}/libz3java.dylib" "${EXTDIR}/libz3java.dylib"
cp "bin/z3" "${BINDIR}/"
umask "${OLD_UMASK}" || exit 1
cd "${OLD_PWD}" || exit 1
rm -rf "${WORKING}" || exit 1

{'fraction_non_alphanumeric': 0.22818181818181818, 'fraction_numerical': 0.0659090909090909, 'mean_word_length': 5.8354037267080745, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2192047', 'n_tokens_mistral': 1041, 'n_tokens_neox': 952, 'n_words': 183}