App-Git-IssueManager
view release on metacpan or search on metacpan
lib/App/Git/IssueManager/AddHook.pm view on Meta::CPAN
my $self = shift;
die("No .git directory found\n") unless -d ".git";
die("A post-commit hook is already installed. Please add hook manually\n") unless ! -e ".git/hooks/post-commit";
open my $hook,">",".git/hooks/post-commit";
print $hook "#!/bin/sh\n";
print $hook "git-issue-commit-hook\n";
close $hook;
system("chmod a+x .git/hooks/post-commit");
}
1;
__END__
=pod
( run in 0.426 second using v1.01-cache-2.11-cpan-496ff517765 )