#!/bin/sh
# $Id: Distro,v 1.6 2007/05/29 18:11:16 jettero Exp $

./distclean
perl Makefile.PL && make dist

mkdir -p dist

n=`ls *Easy*gz`;
date=`date`;
cat Easy.pm  | pod2html > ./dist/DEMySQL.html
rm -vf pod* ./dist/DBI*Easy*gz
mv -v MySQL*Easy*gz ./dist

cat > ./dist/DEMySQL.b.html << EOF
<p>
This (<a href="$n">$n</a>) is something I've been using over and over.  I don't
remember how I used to live without it.  I had quit publishing this on CPAN for
a while, but I decided to put it back after soneome asked about it.  I have
gotten grief about the namespace previously, but moving it into DBIx didn't
work out.
Check out the man page: <a href="?eo_cat=DEMySQL.html">MySQL::Easy module</a>.
<br><br>Changes:
EOF

echo -n '<pre>' >> ./dist/DEMySQL.b.html
perl -pe '$x++ if m/^\s*$/; exit if $x>2' Changes >> ./dist/DEMySQL.b.html
echo '</pre>' >> ./dist/DEMySQL.b.html

ssh mei.net "(cd /home/voltar/html/PerlModules/; rm -f MySQL*Easy* *DBI*Easy*)"
scp dist/* mei.net:/home/voltar/html/PerlModules/
ssh mei.net "(cd /home/voltar/html/PerlModules/; chmod 644 *.html *.gz)"

cp -va dist/MySQL*.gz /usr/local/portage/dev-perl/jets-favorites/files/MySQL-Easy.tar.gz
rm -rvf dist
