<commit_before>#!/bin/bash
UCS2_REV="$1"

. scripts/common/main.sh
. scripts/common/build.sh
. scripts/common/use-virtual-env.bash

if test -n "$UCS2_REV" ; then
	ensure_opt cpython-ucs2 cpython-ucs2-$UCS2_REV
	use-virtual-env cpython-ucs2-$UCS2_REV "$OPT_DIRECTORY" $UCS2_REV
fi

prepare_build zpython/zsh${UCS2_REV:+-}${UCS2_REV}-$PYTHON_MM \
	--url git://git.code.sf.net/p/zsh/code \
	--also-build "zpython/zpython-$PYTHON_MM
	              --embedded-python
	              --url https://bitbucket.org/ZyX_I/zpython"
ZSH_TGT="$FIRST_TARGET"
ZSH_OPT="$FIRST_OPT_DIRECTORY"
ZSH_BDIR="$FIRST_BUILD_DIRECTORY"
ZPYTHON_BDIR="$SECOND_BUILD_DIRECTORY"

cd "$ZSH_BDIR"
./.preconfig
./configure --prefix="$ZSH_OPT"
# Zsh make may fail due to missing yodl
make || true
# Simple sanity check in case the above command failed in an unexpected way, do 
# not run all tests
make TESTNUM=A01 test
sudo make install || true

cd "$ZPYTHON_BDIR"
mkdir build
cd build<commit_msg>Use -ucs2 suffix for UCS2 zsh builds<commit_after>#!/bin/bash
UCS2_REV="$1"

. scripts/common/main.sh
. scripts/common/build.sh
. scripts/common/use-virtual-env.bash

if test -n "$UCS2_REV" ; then
	ensure_opt cpython-ucs2 cpython-ucs2-$UCS2_REV
	use-virtual-env cpython-ucs2-$UCS2_REV "$OPT_DIRECTORY" $UCS2_REV
fi

prepare_build zpython/zsh-$PYTHON_MM${UCS2_REV:+-ucs2} \
	--url git://git.code.sf.net/p/zsh/code \
	--also-build "zpython/zpython-$PYTHON_MM
	              --embedded-python
	              --url https://bitbucket.org/ZyX_I/zpython"
ZSH_TGT="$FIRST_TARGET"
ZSH_OPT="$FIRST_OPT_DIRECTORY"
ZSH_BDIR="$FIRST_BUILD_DIRECTORY"
ZPYTHON_BDIR="$SECOND_BUILD_DIRECTORY"

cd "$ZSH_BDIR"
./.preconfig
./configure --prefix="$ZSH_OPT"
# Zsh make may fail due to missing yodl
make || true
# Simple sanity check in case the above command failed in an unexpected way, do 
# not run all tests
make TESTNUM=A01 test
sudo make install || true

cd "$ZPYTHON_BDIR"
mkdir build
cd build
{'fraction_non_alphanumeric': 0.13182286302780638, 'fraction_numerical': 0.014418125643666324, 'mean_word_length': 4.059895833333333, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2865046', 'n_tokens_mistral': 802, 'n_tokens_neox': 777, 'n_words': 159}