From 96238d1dff39611da9c0e4bc52bcf869c443766a Mon Sep 17 00:00:00 2001 From: liuyu Date: Wed, 7 Apr 2021 14:32:08 +0800 Subject: [PATCH] modify windows bat script --- build.bat | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/build.bat b/build.bat index 372cb56cc1..4d5ff3e035 100644 --- a/build.bat +++ b/build.bat @@ -26,16 +26,12 @@ set VERSION_MAJOR='' set VERSION_MINOR='' set ERSION_REVISION='' -find "const int ms_version_major =" mindspore\lite\include\version.h > version.txt -for /f "delims=\= tokens=2" %%a in ('findstr "const int ms_version_major = " version.txt') do (set x=%%a) +for /f "delims=\= tokens=2" %%a in ('findstr /C:"const int ms_version_major = " mindspore\lite\include\version.h') do (set x=%%a) set VERSION_MAJOR=%x:~1,1% -find "const int ms_version_minor =" mindspore\lite\include\version.h > version.txt -for /f "delims=\= tokens=2" %%b in ('findstr "const int ms_versio/retestn_minor = " version.txt') do (set y=%%b) +for /f "delims=\= tokens=2" %%b in ('findstr /C:"const int ms_version_minor = " mindspore\lite\include\version.h') do (set y=%%b) set VERSION_MINOR=%y:~1,1% -find "const int ms_version_revision =" mindspore\lite\include\version.h > version.txt -for /f "delims=\= tokens=2" %%c in ('findstr "const int ms_version_revision = " version.txt') do (set z=%%c) +for /f "delims=\= tokens=2" %%c in ('findstr /C:"const int ms_version_revision = " mindspore\lite\include\version.h') do (set z=%%c) set VERSION_REVISION=%z:~1,1% -del version.txt echo "======Start building MindSpore Lite %VERSION_MAJOR%.%VERSION_MINOR%.%VERSION_REVISION%======"