<commit_before>#! /bin/sh

set -e
if test "x`darcs whatsnew -s | grep -v '^No changes!'`" != "x" ; then
    echo "record your changes in darcs first!"
    exit 1
fi
builddir=`pwd`/build
dest=~/public_html/leafnode/beta/
vers=`perl -n -l -e 'if (/AM_INIT_AUTOMAKE\(.*,\[?([^]]*)\]?\)/) { print "$1\n"; last; }' configure.ac`
if [ x$QUICK != xquick ] ;then
UPLOAD=yes
if echo "$vers" | grep -E "devel|rc" ; then UPLOAD=no ; fi
echo "test if make works"
(cd $builddir && make -s)
echo "release for leafnode $vers"
(cd $builddir && make -s dist)
cp -p $builddir/leafnode-$vers.tar.bz2 $dest/
#cp -p leafnode-$vers.lsm $dest/
cp -p $builddir/README $dest/leafnode-readme.txt
#cp -p FAQ.{xml,html,txt,pdf} $dest/
cp -p ChangeLog $dest/ChangeLog.txt
cp -p NEWS TODO UPDATING $dest/
if test ! -e leafnode-$vers.tar.bz2.asc -o ! leafnode-$vers.tar.bz2.asc -nt leafnode-$vers.tar.bz2 ; then
    ( cd $dest ; gpg -ba --sign leafnode-$vers.tar.bz2 )
fi
( 
  echo "   MA `date +%Y-%m-%d` leafnode $vers"
  cat $dest/RELEASE
) >$dest/RELEASE.new && mv $dest/RELEASE.new $dest/RELEASE
vim $dest/RELEASE
fi
perl addpatches.pl
vim $dest/HEADER.html
./export.sh

synchome.sh &
wait

[ -f leafnode-ann.$vers ] && exit 0
tmp=`mktemp leafnode-ann.$vers.XXXXXXXXXX`
trap "rm -f $tmp $tmp.asc" 0
rm -f $tmp
cat <<_EOF >$tmp
Leafnode $vers is available from
http://home.pages.de/~mandree/leafnode/beta/

NEWS:
_EOF

sed '/^$/q;s/^- /+ /' NEWS >>$tmp
gpg --clearsign $tmp
<commit_msg>remove obsolete UPDATING file<commit_after>#! /bin/sh

set -e
if test "x`darcs whatsnew -s | grep -v '^No changes!'`" != "x" ; then
    echo "record your changes in darcs first!"
    exit 1
fi
builddir=`pwd`/build
dest=~/public_html/leafnode/beta/
vers=`perl -n -l -e 'if (/AM_INIT_AUTOMAKE\(.*,\[?([^]]*)\]?\)/) { print "$1\n"; last; }' configure.ac`
if [ x$QUICK != xquick ] ;then
UPLOAD=yes
if echo "$vers" | grep -E "devel|rc" ; then UPLOAD=no ; fi
echo "test if make works"
(cd $builddir && make -s)
echo "release for leafnode $vers"
(cd $builddir && make -s dist)
cp -p $builddir/leafnode-$vers.tar.bz2 $dest/
#cp -p leafnode-$vers.lsm $dest/
cp -p $builddir/README $dest/leafnode-readme.txt
#cp -p FAQ.{xml,html,txt,pdf} $dest/
cp -p ChangeLog $dest/ChangeLog.txt
cp -p NEWS TODO $dest/
if test ! -e leafnode-$vers.tar.bz2.asc -o ! leafnode-$vers.tar.bz2.asc -nt leafnode-$vers.tar.bz2 ; then
    ( cd $dest ; gpg -ba --sign leafnode-$vers.tar.bz2 )
fi
( 
  echo "   MA `date +%Y-%m-%d` leafnode $vers"
  cat $dest/RELEASE
) >$dest/RELEASE.new && mv $dest/RELEASE.new $dest/RELEASE
vim $dest/RELEASE
fi
perl addpatches.pl
vim $dest/HEADER.html
./export.sh

synchome.sh &
wait

[ -f leafnode-ann.$vers ] && exit 0
tmp=`mktemp leafnode-ann.$vers.XXXXXXXXXX`
trap "rm -f $tmp $tmp.asc" 0
rm -f $tmp
cat <<_EOF >$tmp
Leafnode $vers is available from
http://home.pages.de/~mandree/leafnode/beta/

NEWS:
_EOF

sed '/^$/q;s/^- /+ /' NEWS >>$tmp
gpg --clearsign $tmp

{'fraction_non_alphanumeric': 0.19076923076923077, 'fraction_numerical': 0.006153846153846154, 'mean_word_length': 3.4266263237518912, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 2, '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': '42094', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1212, 'n_words': 336}