summaryrefslogtreecommitdiff
path: root/scripts/capsule.sh
diff options
context:
space:
mode:
authorJonathan "Duke" Leto <jonathan@leto.net>2011-01-09 01:01:41 -0800
committerJonathan "Duke" Leto <jonathan@leto.net>2011-01-09 01:01:41 -0800
commit512cb117b8c45c6770c2e8bec5c0bd32902492c0 (patch)
treecdb6202710b693b6553c7be41a012b662dffec0b /scripts/capsule.sh
parentAdd ability to disable perlbrew (diff)
downloadjitterbug-512cb117b8c45c6770c2e8bec5c0bd32902492c0.tar.gz
Function must be defined before it is used
Diffstat (limited to 'scripts/capsule.sh')
-rwxr-xr-xscripts/capsule.sh42
1 files changed, 21 insertions, 21 deletions
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
-}