2 # NetHack 3.7 getinfo.pl $NHDT-Date: 1596498266 2020/08/03 23:44:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $
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
;