~ubuntu-branches/ubuntu/intrepid/ruby1.8/intrepid-updates

« back to all changes in this revision

Viewing changes to win32/ifchange.bat

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2007-03-13 22:11:58 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070313221158-h3oql37brlaf2go2
Tags: 1.8.6-1
* new upstream version, 1.8.6.
* libruby1.8 conflicts with libopenssl-ruby1.8 (< 1.8.6) (closes: #410018)
* changed packaging style to cdbs from dbs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
@echo off
 
2
:: usage: ifchange target temporary
 
3
 
 
4
:: check if fc.exe works.
 
5
echo foo > conftest1.tmp
 
6
echo bar > conftest2.tmp
 
7
fc.exe conftest1.tmp conftest2.tmp > nul
 
8
if not errorlevel 1 goto :brokenfc
 
9
del conftest1.tmp > nul
 
10
del conftest2.tmp > nul
 
11
 
 
12
:: target does not exist or new file differs from it.
 
13
if not exist %1 goto :update
 
14
fc.exe %1 %2 > nul
 
15
if errorlevel 1 goto :update
 
16
 
 
17
:unchange
 
18
echo %1 unchanged.
 
19
del %2
 
20
goto :end
 
21
 
 
22
:brokenfc
 
23
del conftest1.tmp > nul
 
24
del conftest2.tmp > nul
 
25
echo FC.EXE does not work properly.
 
26
echo assuming %1 should be changed.
 
27
 
 
28
:update
 
29
echo %1 updated.
 
30
if exist %1 del %1
 
31
copy %2 %1 > nul
 
32
:end