#!/bin/sh
set -e
set -x
if [ -z "$DISPLAY" -o "$DISPLAY" = ":0.0" ]; then
unset DISPLAY
exec nice xvfb-run -a $0 "$@"
fi
while true; do
# wget -m http://www.perl.org/CPAN/MIRRORED.BY
# MIRROR=`perl -0777 -e 'my @sites = map { /dst_http\s*=\s*"(.+)"/ or die; $1; } grep /^\s*dst_http/m, grep /United States/, <> =~ /^(\S+:.*?\n\n)/gms; print $sites[rand @sites];' < www.cpan.org/MIRRORED.BY`
# cp ~/MyConfig.pm ~/.cpan/CPAN/MyConfig.pm
# minicpan -l ~/cpan -r $MIRROR
# rm -f ~/.cpan/CPAN/MyConfig.pm
for i in blead maint-5.10 maint-5.8; do
set -e
cd ~/git
git fetch origin $i
if [ ! -e ~/stamp-$i -o ~/git/.git/refs/remotes/origin/$i -nt ~/stamp-$i ]; then
git clean -dxf
git checkout origin/$i
touch -r ~/git/.git/refs/remotes/origin/$i ~/stamp-$i
./Configure \
-Dusedevel \
-Dinstallbin \
-Dprefix=$HOME/perl-$i \
-Doptimize="-g -Duse64bitall -Dusethreads" \
-des
make -j2 && make test
# Install it, and create a 'perl' link so we actually use it.
rm -rf "$HOME/perl-$i"
make install
ln -sf "$HOME/perl-$i/bin/perl5"* "$HOME/perl-$i/bin/perl"
# Whack CPAN since we're rebuilt.
rm -rf "$HOME/cpan-build-$i"
fi
# CPAN
[ -d "$HOME/perl-$i" ] || exit 1
[ -d "$HOME/cpan-build-$i" ] || mkdir "$HOME/cpan-build-$i"
[ -d "$HOME/perl-$i/lib/site_perl/CPAN" ] || mkdir "$HOME/perl-$i/lib/site_perl/CPAN"
perl -pe "s{%CPANBUILD%}{/home/perl/cpan-build-$i}g;" ~/MyConfig.pm > "$HOME/perl-$i/lib/site_perl/CPAN/MyConfig.pm"
export PATH="$HOME/perl-$i/bin:$HOME/explode:$PATH"
export PERL_CR_SMOKER_RUNONCE=1
/usr/bin/perl -I "$HOME/perl-$i/lib/site_perl" -MCPAN::Reporter::Smoker -e start
cd ..
done
wait
exit 1
done
Thread Previous
|
Thread Next