OSDN Git Service

import nethack-3.6.0
[jnethack/source.git] / DEVEL / hooksdir / prepare-commit-msg
1 #!/usr/bin/perl
2 # $NHDT-Date$
3
4 #STARTUP-START
5 BEGIN {
6     # OS hackery has to be duplicated in each of the hooks :/
7     # first the directory separator
8     my $DS = quotemeta('/');
9     my $PDS = '/';
10     # msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
11     # temporarily removed because inconsistent behavior
12     # if ($^O eq "msys")
13     # {
14     #   $/ = "\r\n";
15     #   $\ = "\r\n";
16     # }
17     if($^O eq "MSWin32"){
18         $DS = quotemeta('\\');
19         $PDS = '\\';
20     }
21     $gitdir = `git rev-parse --git-dir`;
22     chomp $gitdir;
23     push(@INC, $gitdir.$PDS."hooks");
24 }
25 use NHgithook;
26 #STARTUP-END
27
28 &NHgithook::PRE;
29 &NHgithook::POST;
30 exit 0;