OSDN Git Service

upgrade to 3.6.1
[jnethack/source.git] / DEVEL / hooksdir / pre-commit
1 #!/usr/bin/perl
2 # NetHack 3.6  pre-commit       $NHDT-Date: 1524689632 2018/04/25 20:53:52 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.1 $
3 # Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
4 # NetHack may be freely redistributed.  See license for details.
5
6 #STARTUP-START
7 BEGIN {
8     # OS hackery has to be duplicated in each of the hooks :/
9     # first the directory separator
10     my $DS = quotemeta('/');
11     my $PDS = '/';
12     # msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
13     # temporarily removed because inconsistent behavior
14     # if ($^O eq "msys")
15     # {
16     #   $/ = "\r\n";
17     #   $\ = "\r\n";
18     # }
19     if($^O eq "MSWin32"){
20         $DS = quotemeta('\\');
21         $PDS = '\\';
22     }
23     $gitdir = `git rev-parse --git-dir`;
24     chomp $gitdir;
25     push(@INC, $gitdir.$PDS."hooks");
26 }
27 use NHgithook;
28 #STARTUP-END
29
30 &NHgithook::PRE;
31 &NHgithook::POST;
32 exit 0;