autorevision ... with some perl love

master
Buginator 2011-03-17 19:45:39 -04:00
parent 5cfd2e9dbe
commit 518681e770
1 changed files with 14 additions and 2 deletions

View File

@ -1,2 +1,14 @@
echo "Building autorevision.h, you MUST have msysgit installed, and in your system path!"
sh.exe %1..\build_tools\autorevision.sh %1..\src\autorevision.h
echo "Building autorevision.h... (msysgit must be in system path)"
IF EXIST %1..\src\autorevision.h del %1..\src\autorevision.h
sh.exe %1..\build_tools\autorevision.sh %1..\src\autorevision.h.lf
IF NOT EXIST %1..\src\autorevision.h.lf goto failed:
echo "converting file to CRLF from LF"
perl -p -e 's/\n/\r\n/' < %1..\src\autorevision.h.lf > %1..\src\autorevision.h
del %1..\src\autorevision.h.lf
IF EXIST %1..\src\autorevision.h goto good:
:failed
echo "Failed! Is msysgit in your system path?"
exit
:good
echo "File has been generated."
exit