Skip to content

Commit

Permalink
pass options to cpanm command.
Browse files Browse the repository at this point in the history
  • Loading branch information
tokuhirom committed Oct 14, 2010
1 parent 91b5cd3 commit 51daa39
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cpanm-github
Expand Up @@ -2,12 +2,15 @@
use strict;
use warnings;

my $src = shift @ARGV or die "Usage: $0 user/proj[/branch]";
my @args = grep { /^-/ } @ARGV;
my ($src) = grep { !/^-/ } @ARGV;
die "Usage: $0 user/proj[/branch]" unless $src;

my ($user, $proj, $branch) = split m{/}, $src;
$branch = 'master' unless defined $branch;

my $url = "http://github.com/$user/$proj/tarball/$branch";

exec 'cpanm', $url;
exec 'cpanm', @args, $url;
die "cannot exec: $!";

0 comments on commit 51daa39

Please sign in to comment.