Minor Visual Studio build change
This commit is contained in:
parent
d08d63b180
commit
b669e937e6
@ -1,42 +1,31 @@
|
|||||||
@echo off
|
@echo off
|
||||||
if not exist %1 goto nofile
|
if not exist %1 goto nofile
|
||||||
if exist %2 goto copy
|
if exist %2 goto next
|
||||||
|
|
||||||
echo creating directory %2
|
echo creating directory %2
|
||||||
md %2 > nul
|
md %2 > nul
|
||||||
|
|
||||||
:copy
|
:next
|
||||||
|
rem strip quotes if present
|
||||||
set str=%2
|
set str=%2
|
||||||
for /f "useback tokens=*" %%a in ('%str%') do set str=%%~a
|
for /f "useback tokens=*" %%a in ('%str%') do set str=%%~a
|
||||||
|
|
||||||
|
rem add a backslash if the output directory lacks one
|
||||||
set str=%str:~-1%
|
set str=%str:~-1%
|
||||||
if %str% == "\" goto hasbackslash
|
if "%str%" == "\" (set outf=%2%3) else (set outf=%2\%3)
|
||||||
|
|
||||||
if not exist %2\%3 goto cpy
|
echo copying %1 to %outf% (if not present or changed)
|
||||||
fc %1 %2\%3 > nul && if not %errorlevel 1 goto exit
|
if not exist "%outf%" goto copy
|
||||||
echo overwriting %2\%3 with %1
|
|
||||||
copy %1 %2\%3 > nul
|
|
||||||
goto exit
|
|
||||||
|
|
||||||
:cpy
|
rem don't overwrite if output exists and is not changed
|
||||||
echo copying %1 to %2\%3
|
fc %1 %outf% > nul && if not %errorlevel 1 goto exit
|
||||||
copy %1 %2\%3 > nul
|
echo overwriting %outf% with %1
|
||||||
goto exit
|
|
||||||
|
|
||||||
:hasbackslash
|
:copy
|
||||||
if not exist %2%3 goto cpy2
|
copy %1 %outf% > nul
|
||||||
fc %1 %2%3 > nul && if not %errorlevel 1 goto exit
|
|
||||||
echo overwriting %2%3 with %1
|
|
||||||
copy %1 %2%3 > nul
|
|
||||||
goto exit
|
|
||||||
|
|
||||||
:cpy2
|
|
||||||
echo copying %1 to %2%3
|
|
||||||
copy %1 %2%3 > nul
|
|
||||||
goto exit
|
goto exit
|
||||||
|
|
||||||
:nofile
|
:nofile
|
||||||
echo %1 not found
|
echo %1 not found
|
||||||
|
|
||||||
:exit
|
:exit
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,42 +1,31 @@
|
|||||||
@echo off
|
@echo off
|
||||||
if not exist %1 goto nofile
|
if not exist %1 goto nofile
|
||||||
if exist %2 goto copy
|
if exist %2 goto next
|
||||||
|
|
||||||
echo creating directory %2
|
echo creating directory %2
|
||||||
md %2 > nul
|
md %2 > nul
|
||||||
|
|
||||||
:copy
|
:next
|
||||||
|
rem strip quotes if present
|
||||||
set str=%2
|
set str=%2
|
||||||
for /f "useback tokens=*" %%a in ('%str%') do set str=%%~a
|
for /f "useback tokens=*" %%a in ('%str%') do set str=%%~a
|
||||||
|
|
||||||
|
rem add a backslash if the output directory lacks one
|
||||||
set str=%str:~-1%
|
set str=%str:~-1%
|
||||||
if %str% == "\" goto hasbackslash
|
if "%str%" == "\" (set outf=%2%3) else (set outf=%2\%3)
|
||||||
|
|
||||||
if not exist %2\%3 goto cpy
|
echo copying %1 to %outf% (if not present or changed)
|
||||||
fc %1 %2\%3 > nul && if not %errorlevel 1 goto exit
|
if not exist "%outf%" goto copy
|
||||||
echo overwriting %2\%3 with %1
|
|
||||||
copy %1 %2\%3 > nul
|
|
||||||
goto exit
|
|
||||||
|
|
||||||
:cpy
|
rem don't overwrite if output exists and is not changed
|
||||||
echo copying %1 to %2\%3
|
fc %1 %outf% > nul && if not %errorlevel 1 goto exit
|
||||||
copy %1 %2\%3 > nul
|
echo overwriting %outf% with %1
|
||||||
goto exit
|
|
||||||
|
|
||||||
:hasbackslash
|
:copy
|
||||||
if not exist %2%3 goto cpy2
|
copy %1 %outf% > nul
|
||||||
fc %1 %2%3 > nul && if not %errorlevel 1 goto exit
|
|
||||||
echo overwriting %2%3 with %1
|
|
||||||
copy %1 %2%3 > nul
|
|
||||||
goto exit
|
|
||||||
|
|
||||||
:cpy2
|
|
||||||
echo copying %1 to %2%3
|
|
||||||
copy %1 %2%3 > nul
|
|
||||||
goto exit
|
goto exit
|
||||||
|
|
||||||
:nofile
|
:nofile
|
||||||
echo %1 not found
|
echo %1 not found
|
||||||
|
|
||||||
:exit
|
:exit
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user