Re: [TSVN] Feature Request: SubWCRev reads a config file...
From: Nathan Kidd <nathan-svn_at_spicycrypto.ca>
Date: 2005-08-10 22:14:24 CEST
Peter Mounce wrote:
In case you're not familiar with sed syntax, you basically want:
s/REPLACE THIS/WITH THIS/g
We use this in our build scripts all the time.
You could use something like:
-- set filesWithVersion=src\version.in src\version.h for %%i in (%filesWithVersion%) do ( call :replaceVersionStrings %%i ) goto :eof :: replace version values in a file, using sed :replaceVersionStrings setlocal set "file=%~1" if not exist "%file%" goto :error copy "%file%" "%file%.orig" || goto :error sed "s/\$Version_Placeholder/%VERSION_NUMBER%/g" "%file%.orig" > "%file%" || goto :error del "%file%.orig" endlocal goto :eof :error echo Error in :replaceVersionStrings "%file%"! endlocal goto :eof --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org For additional commands, e-mail: dev-help@tortoisesvn.tigris.orgReceived on Wed Aug 10 22:14:19 2005 |
This is an archived mail posted to the TortoiseSVN Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.