Files
nethack/DEVEL/hooksdir/NHadd
2015-02-11 19:42:57 -05:00

15 lines
341 B
Perl
Executable File

#!/usr/bin/perl
# wrapper for nhadd and nhcommit aliases
# $NHDT-Date$
%ok = map { $_ => 1 } ('add', 'commit');
die "Bad subcommand '$ARGV[0]'" unless $ok{$ARGV[0]};
if(length $ENV{GIT_PREFIX}){
chdir($ENV{GIT_PREFIX}) or die "Can't chdir $ENV{GIT_PREFIX}: $!";
}
$ENV{NHMODE} = 1;
exec "git", @ARGV or die "Can't exec git: $!";