]> git.vpit.fr Git - perl/modules/rgit.git/blobdiff - t/bin/git.bat
Wrap t/bin/git into t/bin/git.bat to test on Win32
[perl/modules/rgit.git] / t / bin / git.bat
diff --git a/t/bin/git.bat b/t/bin/git.bat
new file mode 100644 (file)
index 0000000..dc7447a
--- /dev/null
@@ -0,0 +1,28 @@
+@rem = '--*-Perl-*--\r
+@echo off\r
+if "%OS%" == "Windows_NT" goto WinNT\r
+perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9\r
+goto endofperl\r
+:WinNT\r
+perl -x -S %0 %*\r
+if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl\r
+if %errorlevel% == 9009 echo You do not have Perl in your PATH.\r
+if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul\r
+goto endofperl\r
+@rem ';\r
+#!/usr/bin/env perl\r
+#line 15\r
+\r
+# This has to work with olde perls\r
+\r
+my $filename = shift @ARGV;\r
+my $cmd = shift @ARGV;\r
+open FH, ">>$filename" or die "open($filename): $!";\r
+print FH join '|', $cmd, @ARGV;\r
+print FH "\n";\r
+close FH;\r
+\r
+exit(($cmd && $cmd eq 'FAIL') ? 1 : 0);\r
+\r
+__END__\r
+:endofperl\r