#!/usr/bin/env perl
use strict;
use warnings;
use lib 'lib';

my $make      = 'make';
my $branch    = shift || 'master';
my $base_dir  = shift || "$ENV{HOME}/git/Math-GSL-$branch";

chdir $base_dir or die "$base_dir: $!";

my $smolder  = qq{ export PERL5LIB=`pwd`/lib:\$PERL5LIB && $^X $base_dir/bin/smolder_mathgsl };

system "cd $base_dir && git pull origin $branch ";
system "perl Build.PL && ./Build && $smolder && ./Build clean";

print "You just smoked some Math::GSL on branch $branch\n";

