<commit_before>#!/usr/bin/env bash
set -eux

sed -i "s|-I/usr/local/opt/icu4c/include -I/opt/homebrew/opt/icu4c/include|-I$PREFIX/include|g" src/couch/rebar.config.script
sed -i "s|-L/usr/local/opt/icu4c/lib -L/opt/homebrew/opt/icu4c/lib|-L$PREFIX/lib|g" src/couch/rebar.config.script
export CFLAGS="-I$PREFIX/include -I$PREFIX/include/mozjs-91 -I$PREFIX/lib/erlang/usr/include"
export LDFLAGS="-L$PREFIX/lib"
export ERL_CFLAGS="$CFLAGS"
export ERL_LDFLAGS="$LDFLAGS"
./configure --erlang-md5 --spidermonkey-version 91
make release

install -dm755 $PREFIX/lib
cp -r rel/couchdb $PREFIX/lib/couchdb

CORE_ROOT=$PREFIX/lib/couchdb

# Write launch script and make executable
LAUNCH_SCRIPT=$PREFIX/bin/couchdb
cat <<EOF >$LAUNCH_SCRIPT
#!/bin/bash
$CORE_ROOT/bin/couchdb "\$@"
EOF
chmod +x $LAUNCH_SCRIPT

JS_SCRIPT=$PREFIX/bin/couchjs
cat <<EOF >$JS_SCRIPT
#!/bin/bash
$CORE_ROOT/bin/couchjs "\$@"
EOF
chmod +x $JS_SCRIPT
<commit_msg>explicit sed suffix<commit_after>#!/usr/bin/env bash
set -eux

sed -i '' "s|-I/usr/local/opt/icu4c/include -I/opt/homebrew/opt/icu4c/include|-I$PREFIX/include|g" src/couch/rebar.config.script
sed -i '' "s|-L/usr/local/opt/icu4c/lib -L/opt/homebrew/opt/icu4c/lib|-L$PREFIX/lib|g" src/couch/rebar.config.script
export CFLAGS="-I$PREFIX/include -I$PREFIX/include/mozjs-91 -I$PREFIX/lib/erlang/usr/include"
export LDFLAGS="-L$PREFIX/lib"
export ERL_CFLAGS="$CFLAGS"
export ERL_LDFLAGS="$LDFLAGS"
./configure --erlang-md5 --spidermonkey-version 91
make release

install -dm755 $PREFIX/lib
cp -r rel/couchdb $PREFIX/lib/couchdb

CORE_ROOT=$PREFIX/lib/couchdb

# Write launch script and make executable
LAUNCH_SCRIPT=$PREFIX/bin/couchdb
cat <<EOF >$LAUNCH_SCRIPT
#!/bin/bash
$CORE_ROOT/bin/couchdb "\$@"
EOF
chmod +x $LAUNCH_SCRIPT

JS_SCRIPT=$PREFIX/bin/couchjs
cat <<EOF >$JS_SCRIPT
#!/bin/bash
$CORE_ROOT/bin/couchjs "\$@"
EOF
chmod +x $JS_SCRIPT

{'fraction_non_alphanumeric': 0.16755602988260407, 'fraction_numerical': 0.012806830309498399, 'mean_word_length': 4.877742946708464, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, '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': '7453247', 'n_tokens_mistral': 840, 'n_tokens_neox': 789, 'n_words': 130}