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

HDF5_NAME=hdf5-1.8.17
HDF5_TARBALL=${HDF5_NAME}.tar.gz
HDF5_SRC_URL=https://www.hdfgroup.org/ftp/HDF5/releases/${HDF5_NAME}/src/${HDF5_TARBALL}
HDF5_SRC_MD5SUM=7d572f8f3b798a628b8245af0391a0ca
BASEPATH="$(pwd)"

verify_sum() {
    echo "${HDF5_SRC_MD5SUM} ${HDF5_TARBALL}" | md5sum --quiet -c
}

verify_sum
if [ "$?" != "0" ] ; then
    curl -o "${HDF5_TARBALL}" "${HDF5_SRC_URL}"
fi

verify_sum && tar zxf "${HDF5_TARBALL}"
if [ "$?" = "0" ] ; then
    cd ${HDF5_NAME}
    ./configure --enable-fortran --enable-fortran2003 --disable-shared --prefix="${BASEPATH}/_${HDF5_NAME}"
    make -j 2 && make install
fi<commit_msg>use openssl when md5sum is absent<commit_after>#!/bin/bash
set -x

HDF5_NAME=hdf5-1.8.17
HDF5_TARBALL=${HDF5_NAME}.tar.gz
HDF5_SRC_URL=https://www.hdfgroup.org/ftp/HDF5/releases/${HDF5_NAME}/src/${HDF5_TARBALL}
HDF5_SRC_MD5SUM=7d572f8f3b798a628b8245af0391a0ca
BASEPATH="$(pwd)"

verify_sum() {
   if which md5sum ; then
      echo "${HDF5_SRC_MD5SUM} ${HDF5_TARBALL}" | md5sum --quiet -c
   else
      LOCAL_SUM=$(openssl md5 -r ${HDF5_TARBALL})
      [ "$LOCAL_SUM" = "${HDF5_SRC_MD5SUM} *${HDF5_TARBALL}" ]
   fi
}

verify_sum
if [ "$?" != "0" ] ; then
    curl -o "${HDF5_TARBALL}" "${HDF5_SRC_URL}"
fi

verify_sum && tar zxf "${HDF5_TARBALL}"
if [ "$?" = "0" ] ; then
    cd ${HDF5_NAME}
    ./configure --enable-fortran --enable-fortran2003 --disable-shared --prefix="${BASEPATH}/_${HDF5_NAME}"
    make -j 2 && make install
fi
{'fraction_non_alphanumeric': 0.18670248488918736, 'fraction_numerical': 0.07320349227669577, 'mean_word_length': 4.228070175438597, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '2472279', 'n_tokens_mistral': 726, 'n_tokens_neox': 688, 'n_words': 105}