<commit_before>#!/bin/bash

# $Id$ $Revision$

WWW=www.graphviz.org
DATE=`date -u +%Y%m%d.%H%M`
HOST=`uname -n`

export CVSROOT=:ext:<EMAIL>:/home/cvsroot
export CVS_RSH=ssh

GRAPHVIZ_ROOT=/pub/graphviz
SRCDIR=CURRENT
if test .$1 != . ;then
    SRCDIR=$1
fi
GRAPHVIZ_PATH=$GRAPHVIZ_ROOT/$SRCDIR
 
RPMBUILD=$HOME/rpmbuild/$HOST
cd $HOME/tmp/gviz

# cleanup previous
rm -rf webdot

# obtain latest from cvs
$HOME/graphviz-build/redhat/anoncvs.tcl -Qz3 co webdot
#cvs -Qz3 co webdot

cd webdot

if test $SRCDIR = CURRENT; then
    BASEVERSION=`grep 'AC_INIT(webdot' configure.ac | sed 's/AC_INIT(webdot, \([0-9.]*\))/\1/'`
    VERSION=$BASEVERSION.$DATE

    sed "s/\(AC_INIT(webdot, [0-9.]*\))/\1.$DATE)/" <configure.ac >t$$
    mv t$$ configure.ac
else
    VERSION=`grep 'AC_INIT(webdot' configure.ac | sed 's/AC_INIT(webdot, \([0-9.]*\))/\1/'`
fi

./autogen.sh >/dev/null
./configure >/dev/null
make dist >/dev/null

if ! test -f webdot-$VERSION.tar.gz; then
    exit -1
fi

md5sum webdot-$VERSION.tar.gz >webdot-$VERSION.tar.gz.md5
scp -p webdot-$VERSION.tar.gz webdot-$VERSION.tar.gz.md5 $WWW:$GRAPHVIZ_PATH

rpmbuild -ts -D "distroagnostic 1" webdot-$VERSION.tar.gz
scp -p $RPMBUILD/SRPMS/webdot-$VERSION-1.src.rpm $WWW:$GRAPHVIZ_PATH<commit_msg>moving webdot into new directory structure<commit_after>#!/bin/bash

# $Id$ $Revision$

WWW=www.graphviz.org
DATE=`date -u +%Y%m%d.%H%M`
HOST=`uname -n`

export CVSROOT=:ext:<EMAIL>:/home/cvsroot
export CVS_RSH=ssh

SRCDIR=CURRENT
if test .$1 != . ;then
    SRCDIR=$1
fi

if test .$SRCDIR = .CURRENT ; then
   GRAPHVIZ_PUB_PATH=/pub/ext_repos/development/
   GRAPHVIZ_ATT_PATH=/pub/int_repos/development/
else
   GRAPHVIZ_PUB_PATH=/pub/ext_repos/stable/
   GRAPHVIZ_ATT_PATH=/pub/int_repos/stable/
fi

RPMBUILD=$HOME/rpmbuild/$HOST
cd $HOME/tmp/gviz

# cleanup previous
rm -rf webdot

# obtain latest from cvs
$HOME/graphviz-build/redhat/anoncvs.tcl -Qz3 co webdot
#cvs -Qz3 co webdot

cd webdot

if test $SRCDIR = CURRENT; then
    BASEVERSION=`grep 'AC_INIT(webdot' configure.ac | sed 's/AC_INIT(webdot, \([0-9.]*\))/\1/'`
    VERSION=$BASEVERSION.$DATE

    sed "s/\(AC_INIT(webdot, [0-9.]*\))/\1.$DATE)/" <configure.ac >t$$
    mv t$$ configure.ac
else
    VERSION=`grep 'AC_INIT(webdot' configure.ac | sed 's/AC_INIT(webdot, \([0-9.]*\))/\1/'`
fi

./autogen.sh >/dev/null
./configure >/dev/null
make dist >/dev/null

if ! test -f webdot-$VERSION.tar.gz; then
    exit -1
fi

SOURCES=$GRAPHVIZ_PUB_PATH/SOURCES
SRPMS=$GRAPHVIZ_PUB_PATH/SRPMS

md5sum webdot-$VERSION.tar.gz >webdot-$VERSION.tar.gz.md5
ssh $WWW "mkdir -p $SOURCES $SRPMS"
scp -p webdot-$VERSION.tar.gz webdot-$VERSION.tar.gz.md5 $WWW:$SOURCES/

rpmbuild -ts -D "distroagnostic 1" webdot-$VERSION.tar.gz
scp -p $RPMBUILD/SRPMS/webdot-$VERSION-1.src.rpm $WWW:$SRPMS/

# copy for internal use

SOURCES=$GRAPHVIZ_ATT_PATH/SOURCES
SRPMS=$GRAPHVIZ_ATT_PATH/SRPMS

ssh $WWW "mkdir -p $SOURCES $SRPMS"
scp -p webdot-$VERSION.tar.gz webdot-$VERSION.tar.gz.md5 $WWW:$SOURCES/
scp -p $RPMBUILD/SRPMS/webdot-$VERSION-1.src.rpm $WWW:$SRPMS/

{'fraction_non_alphanumeric': 0.17334208798424164, 'fraction_numerical': 0.013131976362442548, 'mean_word_length': 3.962540716612378, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3177755', 'n_tokens_mistral': 1424, 'n_tokens_neox': 1348, 'n_words': 252}