<commit_before>#!/bin/sh

set -e

announce_list="<EMAIL>"
host_people=annarchy.freedesktop.org
host_xorg=xorg.freedesktop.org

usage()
{
    cat <<HELP
Usage: `basename $0` [options] <section> <tag_previous> <tag_current>

Options:
  --force       force overwritting an existing release
  --help        this help message
HELP
}

gen_announce_mail()
{
    cat <<RELEASE
Subject: [ANNOUNCE] $module $version
To: $announce_list

`git-log --no-merges $tag_previous..$tag_current | git shortlog`

git tag: $tag_current

http://$host_xorg/$section_path/$tarbz2
MD5: `cd $tarball_dir && md5sum $tarbz2`
SHA1: `cd $tarball_dir && sha1sum $tarbz2`

http://$host_xorg/$section_path/$targz
MD5: `cd $tarball_dir && md5sum $targz`
SHA1: `cd $tarball_dir && sha1sum $targz`

RELEASE
}

export LC_ALL=C

while [ $# != 0 ]; do
    case "$1" in
    --force)
        force="yes"
        shift
        ;;
    --help)
        usage
        exit 0
        ;;
    --*)
        echo "error: unknown option"
        usage
        exit 1
        ;;
    *)
        section="$1"
        tag_previous="$2"
        tag_current="$3"
        shift 3
        if [ $# != 0 ]; then
            echo "error: unknown parameter"
            usage
            exit 1
        fi
        ;;
    esac
done

tarball_dir="$(dirname $(find -name config.status))"
module="${tag_current%-*}"
version="${tag_current##*-}"
tarbz2="$tag_current.tar.bz2"
targz="$tag_current.tar.gz"
announce="$tarball_dir/$tag_current.announce"

section_path="archive/individual/$section"
srv_path="/srv/$host_xorg/$section_path"

echo "checking parameters"
if ! [ -f "$tarball_dir/$tarbz2" ] ||
   ! [ -f "$tarball_dir/$targz" ] ||
     [ -z "$tag_previous" ] ||
     [ -z "$section" ]; then
    echo "error: incorrect parameters!"
    usage
    exit 1<commit_msg>Specify path to find command for compatibility with traditional Unix find<commit_after>#!/bin/sh

set -e

announce_list="<EMAIL>"
host_people=annarchy.freedesktop.org
host_xorg=xorg.freedesktop.org

usage()
{
    cat <<HELP
Usage: `basename $0` [options] <section> <tag_previous> <tag_current>

Options:
  --force       force overwritting an existing release
  --help        this help message
HELP
}

gen_announce_mail()
{
    cat <<RELEASE
Subject: [ANNOUNCE] $module $version
To: $announce_list

`git-log --no-merges $tag_previous..$tag_current | git shortlog`

git tag: $tag_current

http://$host_xorg/$section_path/$tarbz2
MD5: `cd $tarball_dir && md5sum $tarbz2`
SHA1: `cd $tarball_dir && sha1sum $tarbz2`

http://$host_xorg/$section_path/$targz
MD5: `cd $tarball_dir && md5sum $targz`
SHA1: `cd $tarball_dir && sha1sum $targz`

RELEASE
}

export LC_ALL=C

while [ $# != 0 ]; do
    case "$1" in
    --force)
        force="yes"
        shift
        ;;
    --help)
        usage
        exit 0
        ;;
    --*)
        echo "error: unknown option"
        usage
        exit 1
        ;;
    *)
        section="$1"
        tag_previous="$2"
        tag_current="$3"
        shift 3
        if [ $# != 0 ]; then
            echo "error: unknown parameter"
            usage
            exit 1
        fi
        ;;
    esac
done

tarball_dir="$(dirname $(find . -name config.status))"
module="${tag_current%-*}"
version="${tag_current##*-}"
tarbz2="$tag_current.tar.bz2"
targz="$tag_current.tar.gz"
announce="$tarball_dir/$tag_current.announce"

section_path="archive/individual/$section"
srv_path="/srv/$host_xorg/$section_path"

echo "checking parameters"
if ! [ -f "$tarball_dir/$tarbz2" ] ||
   ! [ -f "$tarball_dir/$targz" ] ||
     [ -z "$tag_previous" ] ||
     [ -z "$section" ]; then
    echo "error: incorrect parameters!"
    usage
    exit 1
{'fraction_non_alphanumeric': 0.1515565264882578, 'fraction_numerical': 0.014199890770071, 'mean_word_length': 2.711246200607903, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 11, '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': '3888727', 'n_tokens_mistral': 1366, 'n_tokens_neox': 1306, 'n_words': 287}