~ubuntu-branches/ubuntu/precise/cvsdelta/precise

« back to all changes in this revision

Viewing changes to cvsdeltarun.rb

  • Committer: Bazaar Package Importer
  • Author(s): Eric Dorland
  • Date: 2004-11-06 00:34:23 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041106003423-mku5p6uldfxj1c5a
Tags: 1.7.0-1
New upstream release. No reason this can't go into sarge. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
exec ruby -w -x $0 ${1+"$@"} # -*- ruby -*-
3
 
#!ruby -w
4
 
 
5
 
# $Id: cvsdeltarun.rb,v 1.9 2004/02/17 02:33:01 jeugenepace Exp $
6
 
 
7
 
# cvsdelta: summarizes CVS changes and executes the appropriate commands
8
 
 
9
 
require './cvsdeltaopt'
10
 
require './cvsdelta'
11
 
 
12
 
$stdout.sync = true             # unbuffer output
13
 
$stderr.sync = true             # unbuffer output
14
 
$stdin.sync  = true             # unbuffer input
15
 
 
16
 
$PACKAGE = "cvsdelta"
17
 
$VERSION = "1.6.9"
18
 
 
19
 
begin
20
 
  options = CVSDeltaOptions.new($PACKAGE, $VERSION)
21
 
  options.run
22
 
 
23
 
  Log.verbose = options.verbose
24
 
  # Log.output = "/tmp/cvsdelta.log." + Process.pid.to_s
25
 
  Log.set_widths(15, -5, -35)
26
 
 
27
 
  # we should be running this from a CVS'ed directory
28
 
  unless File.exists?("CVS")
29
 
    $stderr.print "this directory does not appear to be part of a CVS project\n"
30
 
  end
31
 
 
32
 
  delta = CVSDelta.new(options, ARGV)
33
 
  delta.run
34
 
  delta.print_change_summary
35
 
 
36
 
  if options.execute
37
 
    exec = CVSExecute.new(delta.added, delta.deleted)
38
 
    exec.confirm = options.confirm
39
 
    exec.run
40
 
  end
41
 
rescue => e
42
 
  # show only the message, not the stack trace:
43
 
  $stderr.puts "error: #{e}"
44
 
end