[#5219] Segmentation fault in timeout.rb — Michel Pastor <K@...>

Hi,

18 messages 2005/06/16
[#5220] Re: Segmentation fault in timeout.rb — Eric Hodel <drbrain@...7.net> 2005/06/16

[#5221] Re: Segmentation fault in timeout.rb — Michel Pastor <K@...> 2005/06/16

On Fri, 17 Jun 2005 05:03:18 +0900

[#5223] Re: Segmentation fault in timeout.rb — nobu.nokada@... 2005/06/17

Hi,

[#5296] Subversion — Shugo Maeda <shugo@...>

Hi,

64 messages 2005/06/30
[#5297] Re: Subversion — Curt Hibbs <curt@...> 2005/06/30

Shugo Maeda wrote:

[#5298] Re: Subversion — Nikolai Weibull <mailing-lists.ruby-core@...> 2005/06/30

Curt Hibbs wrote:

[#5301] Re: Subversion — Austin Ziegler <halostatue@...> 2005/06/30

On 6/30/05, Nikolai Weibull

[#5304] Re: Subversion — Nikolai Weibull <mailing-lists.ruby-core@...> 2005/06/30

Austin Ziegler wrote:

[#5305] Re: Subversion — Austin Ziegler <halostatue@...> 2005/06/30

On 6/30/05, Nikolai Weibull

[#5307] Re: Subversion — mathew <meta@...> 2005/06/30

Austin Ziegler wrote:

[#5308] Re: Subversion — Austin Ziegler <halostatue@...> 2005/06/30

On 6/30/05, mathew <meta@pobox.com> wrote:

[#5311] Re: Subversion — mathew <meta@...> 2005/07/01

Austin Ziegler wrote:

[#5323] Re: Subversion — Austin Ziegler <halostatue@...> 2005/07/01

On 7/1/05, mathew <meta@pobox.com> wrote:

[#5325] Re: Subversion — Nikolai Weibull <mailing-lists.ruby-core@...> 2005/07/01

Austin Ziegler wrote:

Re: [FILE] Alternative for win32\ifchange.bat

From: nobuyoshi nakada <nobuyoshi.nakada@...>
Date: 2005-06-08 08:20:04 UTC
List: ruby-core #5172
Hi,

At Wed, 8 Jun 2005 01:41:22 +0900,
daz wrote in [ruby-core:05168]:
> According to the XP docs this is still a feature ...
> http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/copy.mspx
> 
> • Copying zero-length files
> 
>   Copy does not copy files that are 0 bytes long. Use xcopy to copy these files.

It is copied on NT 5.0.

  E:\tmp>touch foo

  E:\tmp>dir
   Volume in drive E has no label.
   Volume Serial Number is C8BA-23F0

   Directory of E:\tmp

  2005/06/08  12:50       <DIR>          .
  2005/06/08  12:50       <DIR>          ..
  2005/06/08  12:50                    0 foo
                 1 File(s)              0 bytes
                 2 Dir(s)  23,967,490,048 bytes free

  E:\tmp>copy foo bar
          1 file(s) copied.

  E:\tmp>dir
   Volume in drive E has no label.
   Volume Serial Number is C8BA-23F0

   Directory of E:\tmp

  2005/06/08  12:51       <DIR>          .
  2005/06/08  12:51       <DIR>          ..
  2005/06/08  12:50                    0 bar
  2005/06/08  12:50                    0 foo
                 2 File(s)              0 bytes
                 2 Dir(s)  23,967,490,048 bytes free

  E:\tmp>ver

  Microsoft Windows 2000 [Version 5.00.2195]

Does this batch work as expected even on Windows 95 series?


@echo off
:: usage: ifchange target temporary

:: target does not exist or new file differs from it.
if not exist %1 goto :update
fc.exe %1 %2 > ~fc~1.tmp
if errorlevel 1 goto :update
:: target file is unchanged or fc.exe is broken.

:: check if fc.exe works.
echo foo > conftest1.tmp
echo bar > conftest2.tmp
:: must return non-zero
fc.exe conftest1.tmp conftest2.tmp > nul
if not errorlevel 1 goto :brokenfc
del conftest1.tmp > nul
del conftest2.tmp > nul
del ~fc~1.tmp > nul
goto :unchange

:brokenfc
del conftest1.tmp > nul
del conftest2.tmp > nul
:: echo --- | find.exe "---" > nul
:: if errorlevel 1 goto :msys
find.exe "***" < ~fc~1.tmp > ~fc~2.tmp
del ~fc~1.tmp > nul
copy ~fc~2.tmp ~fc~1.tmp > nul
del ~fc~2.tmp > nul
:: for %%I in (~fc~1.tmp) do if %%~zI == 0 del ~fc~1.tmp
if exist ~fc~1.tmp goto :update
goto :unchange

:: :msys
:: del ~fc~2.tmp > nul
:: cmp %1 %2
:: if errorlevel 1 goto :update

:unchange
echo %1 unchanged.
del %2
goto :end

:update
del ~fc~1.tmp > nul
echo %1 updated.
if exist %1 del %1
copy %2 %1 > nul
:end


-- 
Nobu Nakada


In This Thread