From 512cb117b8c45c6770c2e8bec5c0bd32902492c0 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sun, 9 Jan 2011 01:01:41 -0800 Subject: Function must be defined before it is used --- scripts/capsule.sh | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'scripts') diff --git a/scripts/capsule.sh b/scripts/capsule.sh index cd102a7..45188f0 100755 --- a/scripts/capsule.sh +++ b/scripts/capsule.sh @@ -3,6 +3,27 @@ # first arg: build_dir # second arg: report path +function jitterbug_build () { + if [ -f 'dist.ini' ]; then + echo "Found dist.ini, using Dist::Zilla" + dzil authordeps | cpanm + cpanm --installdeps . + HARNESS_VERBOSE=1 dzil test >> $logfile 2>&1 + elif [ -f 'Build.PL' ]; then + echo "Found Build.PL, using Build.PL" + perl Build.PL + # ./Build installdeps is not available in older Module::Build's + cpanm --installdeps . + HARNESS_VERBOSE=1 ./Build test --verbose >> $logfile 2>&1 + else + echo "Hoping to find Makefile.PL" + perl Makefile.PL + cpanm --installdeps . + make + HARNESS_VERBOSE=1 make test >> $logfile 2>&1 + fi +} + # this is getting smelly builddir=$1 report_path=$2 @@ -31,24 +52,3 @@ else 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 - cpanm --installdeps . - HARNESS_VERBOSE=1 dzil test >> $logfile 2>&1 - elif [ -f 'Build.PL' ]; then - echo "Found Build.PL, using Build.PL" - perl Build.PL - # ./Build installdeps is not available in older Module::Build's - cpanm --installdeps . - HARNESS_VERBOSE=1 ./Build test --verbose >> $logfile 2>&1 - else - echo "Hoping to find Makefile.PL" - perl Makefile.PL - cpanm --installdeps . - make - HARNESS_VERBOSE=1 make test >> $logfile 2>&1 - fi -} -- cgit 1.4.1