<commit_before>#!/bin/sh
# This script takes one argument, which is the architecture to build for,
# or "source".

echo Target architecture: $1
VERSION=`grep String\ VERSION ../core/java/src/net/i2p/CoreVersion.java | cut -d\" -f2`
echo "I2P Version: ${VERSION}"
builddir="packages/$1/i2p-${VERSION}"

if [ "$1" = "source" ]; then
    cd ..
    ant clean
    tempdir=../_i2p_copy_temp___
    cp -a . ${tempdir}
    mkdir -p debian/packages/$1
    mv ${tempdir} debian/${builddir}
    cd debian/${builddir}
    dpkg-buildpackage -I_MTN -Idebian/packages -S
else
    mkdir -p ${builddir}
    cd ${builddir}
    find ../../../.. -not -name . -and -not -name .. -maxdepth 1 -exec ln -fs {} \;
    dpkg-buildpackage -I_MTN -b -a$1
fi
if [ "$?" -ne 0 ]; then
  exit 1
fi

cd ../../..
rm -rf ${builddir}
<commit_msg>Comments<commit_after>#!/bin/sh
# This script takes one argument, which is the architecture to build for,
# or "source".

echo Target architecture: $1
VERSION=`grep String\ VERSION ../core/java/src/net/i2p/CoreVersion.java | cut -d\" -f2`
echo "I2P Version: ${VERSION}"
builddir="packages/$1/i2p-${VERSION}"

# dpkg-buildpackage doesn't have an option to change the output directory,
# so copy or symlink i2p.i2p in ${builddir} and call dpkg-buildpackage
# in that directory. The output files are generated one directory above.
if [ "$1" = "source" ]; then
    cd ..
    ant clean
    # dpkg-source (called by dpkg-buildpackage) can't handle symlinks, so copy the i2p.i2p tree
    tempdir=../_i2p_copy_temp___
    cp -a . ${tempdir}
    mkdir -p debian/packages/$1
    mv ${tempdir} debian/${builddir}
    cd debian/${builddir}
    dpkg-buildpackage -I_MTN -Idebian/packages -S
else
    mkdir -p ${builddir}
    cd ${builddir}
    # make symlinks for all files and dirs in i2p.i2p
    find ../../../.. -not -name . -and -not -name .. -maxdepth 1 -exec ln -fs {} \;
    dpkg-buildpackage -I_MTN -b -a$1
fi
if [ "$?" -ne 0 ]; then
  exit 1
fi

cd ../../..
rm -rf ${builddir}

{'fraction_non_alphanumeric': 0.16094853683148336, 'fraction_numerical': 0.016145307769929364, 'mean_word_length': 2.6927374301675977, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7211053', 'n_tokens_mistral': 740, 'n_tokens_neox': 713, 'n_words': 226}