2 # NetHack 3.6 getinfo.pl $NHDT-Date: 1524689669 2018/04/25 20:54:29 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.2 $
3 # Copyright (c) 2018 by Michael Allison
4 # NetHack may be freely redistributed. See license for details.
8 # OS hackery has to be duplicated in each of the hooks :/
9 # first the directory separator
10 my $DS = quotemeta('/');
12 # msys: POSIXish over a Windows filesystem (so / not \ but \r\n not \n).
13 # temporarily removed because inconsistent behavior
20 $DS = quotemeta('\\');
23 $gitdir = `git rev-parse --git-dir`;
25 push(@INC, $gitdir.$PDS."hooks");
27 # special case for this script only: allow
28 # it to run from DEVEL or $TOP
29 if (-f "hooksdir/NHgithook.pm" || -f "DEVEL/hooksdir/NHgithook.pm"){
30 push(@INC, "DEVEL/hooksdir");
32 chdir("..") if (-f "hooksdir/NHgithook.pm");
36 &NHgithook::nhversioning;