diff options
author | Jonathan "Duke" Leto <jonathan@leto.net> | 2011-01-08 01:44:59 -0800 |
---|---|---|
committer | Jonathan "Duke" Leto <jonathan@leto.net> | 2011-01-08 01:44:59 -0800 |
commit | e0f9ce9218fe3151fe6e395038bcd088dbafad2a (patch) | |
tree | 11afce3acb469c6cf8418e30f4db0069be179777 /scripts/capsule.sh | |
parent | Add debug info for a failed build event (diff) | |
download | jitterbug-e0f9ce9218fe3151fe6e395038bcd088dbafad2a.tar.gz |
Add ability to disable perlbrew
This option comes in handy for those that want to run long test suites on just one version of Perl and/or those using local::lib (which doesn't play nice with perlbrew with XS modules).
Diffstat (limited to '')
-rwxr-xr-x | scripts/capsule.sh | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/scripts/capsule.sh b/scripts/capsule.sh index 7411639..cd102a7 100755 --- a/scripts/capsule.sh +++ b/scripts/capsule.sh @@ -3,27 +3,36 @@ # first arg: build_dir # second arg: report path +# this is getting smelly builddir=$1 report_path=$2 +perlbrew=$3 echo "Creating report_path=$report_path" mkdir -p $report_path cd $builddir -source $HOME/perl5/perlbrew/etc/bashrc - -for perl in $HOME/perl5/perlbrew/perls/perl-5.* -do - theperl="$(basename $perl)" - - echo ">perlbrew switch $theperl" - perlbrew switch $theperl - # TODO: check error condition - - perlversion=$(perl -v) - logfile="$report_path/$theperl.txt" - +if [ $use_perlbrew ]; then + source $HOME/perl5/perlbrew/etc/bashrc + for perl in $HOME/perl5/perlbrew/perls/perl-5.* + do + theperl="$(basename $perl)" + + echo ">perlbrew switch $theperl" + perlbrew switch $theperl + # TODO: check error condition + + logfile="$report_path/$theperl.txt" + jitterbug_build + done +else + theperl="$(basename perl -e \"print $]\")" + logfile="$report_path/$theperl.txt" + jitterbug_build +fi + +function jitterbug_build () { if [ -f 'dist.ini' ]; then echo "Found dist.ini, using Dist::Zilla" dzil authordeps | cpanm @@ -42,4 +51,4 @@ do make HARNESS_VERBOSE=1 make test >> $logfile 2>&1 fi -done +} |