#!/bin/sh

./distclean
perl Makefile.PL && make dist

if [ -d ~/www/PerlModules ]; then
    n=`ls Ma*SMA*gz`;
    date=`date`;
    cat SMA.pm | pod2html > ~/www/PerlModules/SMA.html
    rm -vf pod* ~/www/PerlModules/Ma*SMA*gz
    mv -v Ma*SMA*gz ~/www/PerlModules
cat > ~/www/PerlModules/SMA.b.html << EOF
<p>
I used this for some calculations in my work trying to crack the stock market.
I'd reall like to find a way to win that game.  Anyway, this calculates the
Exponential moving average for you.  The <a href="?eo_cat=SMA.html">Math::Business::SMA module</a> 
(<a href="$n">$n</a>).
Last updated on $date.
EOF
fi

chmod -v 644 ~/www/PerlModules/SMA.* ~/www/PerlModules/Ma*SMA*gz
