X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=maint%2Ftravis-ci_scripts%2F20_install.bash;h=1a4968f1e65a10627b6f18ed0743506142c30c61;hb=32871272c1fa5d098895fb3d6d2b2ed3640f371b;hp=3a4ff7b7b86183dc292386bbdbdbaf08fdc2bb48;hpb=cc7e60178124eedbbdce941b61ee8925263c6319;p=dbsrgits%2FDBIx-Class.git diff --git a/maint/travis-ci_scripts/20_install.bash b/maint/travis-ci_scripts/20_install.bash old mode 100755 new mode 100644 index 3a4ff7b..1a4968f --- a/maint/travis-ci_scripts/20_install.bash +++ b/maint/travis-ci_scripts/20_install.bash @@ -1,5 +1,10 @@ #!/bin/bash +if [[ "${BASH_SOURCE[0]}" == "${0}" ]] ; then + echo "This script can not be executed standalone - it can only be source()d" 1>&2 + exit 1 +fi + if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then return ; fi # we need a mirror that both has the standard index and a backpan version rolled @@ -50,7 +55,7 @@ if [[ -n "$BREWVER" ]] ; then # FIXME work around https://github.com/perl11/cperl/issues/144 # (still affecting 5.22.3) if is_cperl && ! [[ -f ~/perl5/perlbrew/perls/$BREWVER/bin/perl ]] ; then - ln -s ~/perl5/perlbrew/perls/$BREWVER/bin/cperl ~/perl5/perlbrew/perls/$BREWVER/bin/perl + ln -s ~/perl5/perlbrew/perls/$BREWVER/bin/cperl ~/perl5/perlbrew/perls/$BREWVER/bin/perl || /bin/true fi # can not do 'perlbrew use' in the run_or_err subshell above, or a $() @@ -58,7 +63,10 @@ if [[ -n "$BREWVER" ]] ; then # the perl is found (won't be there unless compilation suceeded, wich *ALSO* returns 0) perlbrew use $BREWVER || /bin/true - if [[ "$( perlbrew use | grep -oP '(?<=Currently using ).+' )" != "$BREWVER" ]] ; then + if \ + ! [[ -x ~/perl5/perlbrew/perls/$BREWVER/bin/perl ]] \ + || [[ "$( perlbrew use | grep -oP '(?<=Currently using ).+' )" != "$BREWVER" ]] + then echo_err "Unable to switch to $BREWVER - compilation failed...?" echo_err "$LASTOUT" exit 1 @@ -144,6 +152,9 @@ if [[ "$POISON_ENV" = "true" ]] ; then fi done + echo "POISON_ENV: setting PERL_UNICODE=SAD" + export PERL_UNICODE=SAD + ### emulate a local::lib-like env