Tony, Rick

>> patch -s -t -d vim70 -p0 -i patches/7.0.001
>> patch -s -t -d vim70 -p0 -i patches/7.0.001
>> patch -s -t -d vim70 -p0 -i patches/7.0.001
>> patch -s -t -d vim70 -p0 -i patches/7.0.001
>> etc...
>> 
> I suppose you ment 001, 002, 003, 004, ... at the end of the lines
> 
aehm ... yes, thanks for clarification.

>> I have a loop that executes the patch command for all files
>> named 7.0.* in the vim70/patches directory. But since I am
>> compiling under Windows XP, I can't tell how to program that
>> loop under unix/linux.
>> 
> he's compiling under W32 too IIRC; but under bash it would be (the first 
> time)
> 
>       for p in patches/7.0.* ; do patch -p0 -i $p ; done
> 
Ok. Under Windows, within a .bat script:

for /f %%i in ('dir /b /o vim70\patches\7.0.*') do (
  patch --binary -s -t -d vim70 -p0 -i patches\%%i
)

> Since the 2nd, 3rd, etc. time we don't want to reapply the same
> patches it's less evident, unless "old" patches are removed
> before downloading the new ones.
> 
I have no scruple to let the computer a bit more work than
theoretically necessary if I can improve reliability. This is why I
let my .bat file to completely remove the source tree and rebuild it
from scratch every time I compile a new version of vim. But
theoretically, you are right: One should do something like (untested)

xcopy /E /I /Q /S vim70\patches vim70\patches.old
wget -r -l 1 -nc -nd -P vim70\patches \
                          "ftp://ftp.vim.org/pub/vim/patches/7.0/";
xcopy /E /I /Q /S vim70\patches vim70\patches.new
for /f %%i in ('dir /b /o vim70\patches.old\7.0.*') do (
  del vim70\patches.new\%%~ni
)
for /f %%i in ('dir /b /o vim70\patches.new\7.0.*') do (
  patch --binary -s -t -d vim70 -p0 -i patches.new\%%i
)
rmdir /S /Q patches.new
rmdir /S /Q patches.old

With best regards

Mathias

Reply via email to