The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/bin/sh -x

JOBS=16
perlbrew uninstall cpancover
perlbrew install perl-5.18.2 --as cpancover -j $JOBS -nf
export PATH=$PERLBREW_ROOT/perls/cpancover/bin:$PATH
rm -rf ~/.cpanm
rm -rf ~/cpancover
cpan App::cpanminus
cpanm -nf .
cpanm -nf App::cpanoutdated
cpan-outdated | cpanm -nf
perl utils/install_modules -nf
CPANCOVER_WORKERS=$JOBS perl utils/cpanmcover
rm -r /home/pjcj/cpancover/modules/Test-LeakTrace-0.14/cover_db
cpancover -directory ~/cpancover/modules -outputdir ~/cpancover/results -outputfile index.html -report html_basic -nocollect
find ~/cpancover/results -type f -exec gzip -9 {} \;
chmod -R o=g ~/cpancover/results
www=/usr/share/nginx/www
new=$www/`date +%F`
sudo mv $new $new.$$
sudo cp -a ~/cpancover/results $new
sudo rm $www/latest
sudo ln -s $new $www/latest