]> git.saurik.com Git - wxWidgets.git/blame_incremental - distrib/msw/filerepl.bat
add build/msw/wx_stc.dsp
[wxWidgets.git] / distrib / msw / filerepl.bat
... / ...
CommitLineData
1@echo off
2Rem Replace a string with another string in the given files.
3Rem The first argument is the string to be replaced.
4Rem The second argument is the replacement string.
5Rem The third argument is a file listing the files to be processed.
6
7set keyword=%1
8set repl=%2
9set files=%3
10echo s/%keyword/%repl/g > script.tmp
11
12call %wxwin\distrib\msw\expdwild.bat %3 list.tmp
13Rem goto end
14
15set len=%@LINES[%files]
16do i = 0 to %len by 1
17 set line=%@LINE[list.tmp,%i]
18 if "%line" == "**EOF**" enddo
19rem echo Cmd: grep %keyword %line
20 grep %keyword %line > size.tmp
21 if "%@FILESIZE[size.tmp]" == "0" enddo
22 sed -f script.tmp %line > file.tmp
23 move file.tmp %line
24enddo
25erase script.tmp
26erase list.tmp
27erase size.tmp
28:end