NetHack->aNetHack
[aNetHack.git] / DEVEL / hooksdir / post-checkout
blobb5bf990fee1295555a464ed0d4ebc97b27d19ef1
1 #!/usr/bin/perl
2 # $NHDT-Date$
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 = '\\';
21 $gitdir = `git rev-parse --git-dir`;
22 chomp $gitdir;
23 push(@INC, $gitdir.$PDS."hooks");
25 use NHgithook;
26 #STARTUP-END
28 &NHgithook::PRE;
29 &NHgithook::POST;
30 exit 0;