Skip to content

Commit

Permalink
add non-catalyst project support to catgit :)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrockway committed Jan 15, 2008
1 parent c08ff11 commit 9ac654d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.PL
Expand Up @@ -8,5 +8,6 @@ license 'take what you want';
requires 'File::Attributes';
requires 'File::pushd';
requires 'List::Util';
requires 'IO::Any';

WriteAll();
11 changes: 11 additions & 0 deletions bin/catgit.pl
Expand Up @@ -5,14 +5,25 @@
use File::pushd;
use Term::ReadLine;
use File::Slurp;
use IO::All;

# proj must never contain shell metachars kthx :)

my $proj = shift @ARGV;
my @args = @ARGV;
my $no_cat = grep { /^(?:-n|--no-cat(?:alyst)?)$/ } @args;

`catalystx-starter $proj`;
$proj =~ s/::/-/g;
{
my $dir = pushd $proj;
if($no_cat){
`rm -rf t/live-test.t`;
`rm -rf t/lib`;
my $mf < io 'Makefile.PL';
$mf =~ s/^(build_)?requires.+Catalyst.*\n//mg;
$mf > io 'Makefile.PL';
}
`git init`;
rename 'gitignore', '.gitignore';
`git add * .gitignore`;
Expand Down

0 comments on commit 9ac654d

Please sign in to comment.