| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | use strict; |
| 4 | use warnings; |
| 5 | |
| 6 | unless ($ENV{TRAVIS}) { |
| 7 | die "This script is only intended to be run from Travis CI platform\n"; |
| 8 | } |
| 9 | |
| 10 | unlink "perl_math_int64.h"; |
| 11 | symlink "dependencies/p5-Math-Int64/c_api_client/perl_math_int64.h", "perl_math_int64.h" |
| 12 | or die "unable to symlink perl_math_int64.h: $!"; |
| 13 | |
| 14 | unlink "perl_math_int64.c"; |
| 15 | symlink "dependencies/p5-Math-Int64/c_api_client/perl_math_int64.c", "perl_math_int64.c" |
| 16 | or die "unable to symlink perl_math_int64.c: $!"; |
| 17 | |
| 18 | mkdir "dependencies"; |
| 19 | chdir "dependencies" or die "unable to chdir to dependencies: $!"; |
| 20 | |
| 21 | system "git clone https://github.com/salva/p5-Module-CAPIMaker.git"; |
| 22 | system "cd p5-Module-CAPIMaker && perl Makefile.PL && make install"; |
| 23 | |
| 24 | system "git clone https://github.com/salva/p5-Math-Int64.git"; |
| 25 | system "cd p5-Math-Int64 && perl Makefile.PL && make install"; |