• R/O
  • SSH
  • HTTPS

ttssh2:


File Info

Rev. 8937
Size 1,173 bytes
Time 2020-09-12 00:47:32
Author zmatsuo
Log Message

perlを自動的に探すようにした, 使用する svn を toolinfo.txt に書くようにした

- perl は次のデフォルトフォルダを探す

- buildtools/perl (ActivePerl)
- ActivePerl
- Strawberry perl
- cygwin

Content

@echo off
setlocal
cd /d %~dp0
set BAT=%~n0%~x0

set SVNVERSION_H=../teraterm/ttpdlg/svnversion.h
set SVNVERSION_H_DOS=..\teraterm\ttpdlg\svnversion.h

if NOT EXIST %SVNVERSION_H% goto env_perl
@echo %BAT%: already exist %SVNVERSION_H%
goto finish

:env_perl
if NOT "%PERL%" == "" goto found_perl

:search_perl
set PERL=perl.exe
where %PERL% > nul 2>&1
if %errorlevel% == 0 goto found_perl
set PERL=%~dp0..\buildtools\perl\perl\bin\perl.exe
if exist %PERL% goto found_perl
set PERL=C:\Strawberry\perl\bin\perl.exe
if exist %PERL% goto found_perl
set PERL=C:\Perl64\bin\perl.exe
if exist %PERL% goto found_perl
set PERL=C:\Perl\bin\perl.exe
if exist %PERL% goto found_perl
set PERL=C:\cygwin64\usr\bin\perl.exe
if exist %PERL% goto found_perl
set PERL=C:\cygwin\usr\bin\perl.exe
if exist %PERL% goto found_perl
goto no_perl

:no_perl
@echo %BAT%: perl not found
@echo %BAT%: default svnversion.h is used
if exist sourcetree_info.bat del sourcetree_info.bat
type svnversion.default.h > %SVNVERSION_H_DOS%
goto finish

:found_perl
@echo %BAT%: perl=%PERL%
%PERL% svnrev.pl --root .. --header %SVNVERSION_H%
goto finish


:finish
Show on old repository browser