<commit_before>#!/bin/bash
# $Id:$

ROOT=`dirname $0`/../..
RES=`dirname $0`/res
VERSION=`grep 'VERSION =' $ROOT/setup.py | cut -d "'" -f2`

# Create AVbin files
mkdir -p $ROOT/build/avbin
rsync -a /usr/local/lib/libavbin.dylib $ROOT/build/avbin/
cp /usr/local/lib/`ls -l /usr/local/lib/libavbin.dylib | \
    sed 's/.* -> \(.*\)$/\1/'` $ROOT/build/avbin/
chmod a+rx $ROOT/build/avbin/*
chown root $ROOT/build/avbin/*
chgrp wheel $ROOT/build/avbin/*

PYTHONPATH=`dirname $0`:$PYTHONPATH
export PYTHONPATH

python $ROOT/setup.py bdist_mpkg \
    --background=$RES/background.pdf \
    --readme=$RES/readme.rtf \
    --keep-temp

if [ $? != 0 ]; then<commit_msg>Issue 328: always clean build dir before creating mpkg dist.<commit_after>#!/bin/bash
# $Id:$

ROOT=`dirname $0`/../..
RES=`dirname $0`/res
VERSION=`grep 'VERSION =' $ROOT/setup.py | cut -d "'" -f2`

rm -rf $ROOT/build

# Create AVbin files
mkdir -p $ROOT/build/avbin
rsync -a /usr/local/lib/libavbin.dylib $ROOT/build/avbin/
cp /usr/local/lib/`ls -l /usr/local/lib/libavbin.dylib | \
    sed 's/.* -> \(.*\)$/\1/'` $ROOT/build/avbin/
chmod a+rx $ROOT/build/avbin/*
chown root $ROOT/build/avbin/*
chgrp wheel $ROOT/build/avbin/*

PYTHONPATH=`dirname $0`:$PYTHONPATH
export PYTHONPATH

python $ROOT/setup.py bdist_mpkg \
    --background=$RES/background.pdf \
    --readme=$RES/readme.rtf \
    --keep-temp

if [ $? != 0 ]; then
{'fraction_non_alphanumeric': 0.2069214131218457, 'fraction_numerical': 0.010814708002883922, 'mean_word_length': 3.1186943620178043, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '739587', 'n_tokens_mistral': 601, 'n_tokens_neox': 578, 'n_words': 115}