1 package Oyster::Deploy::Git;
9 use File::ShareDir ':ALL';
15 if( -f $location || -d $location ) {
16 Error::Simple->throw("$location already exists");
20 my $git = Git::Wrapper->new($location);
23 copy(dist_file( 'Oyster', './share/deploy/git/post-receive'), ($git->dir . '.git/hooks/'))
24 or Error::Simple->throw('Creating post commit hooks failed.');
25 copy(dist_file( 'Oyster', './share/deploy/git/post-update'), ($git->dir . '.git/hooks/'))
26 or Error::Simple->throw('Creating post commit hooks failed.');
28 chmod(0x755, ('./bin/git/hooks/post-receive', './bin/git/hooks/post-update'));