~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/config/cvsco-fast-update.pl

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env perl
 
2
#
 
3
# cvsco-fast-update.pl cvs co ... 
 
4
#
 
5
# This command parses a "cvs co ..." command and converts it to 
 
6
# fast-update.pl commands
 
7
#
 
8
use Getopt::Long;
 
9
 
 
10
my $filename = ".fast-update";
 
11
my $start_time = time();
 
12
 
 
13
my $branch;
 
14
my @modules;
 
15
my @dirs;
 
16
 
 
17
print "$0: (".join(')(',@ARGV).")\n";
 
18
while (scalar(@ARGV)) {
 
19
  my $val = shift(@ARGV);
 
20
  if (   ($val eq '-A') || ($val eq 'co') || ($val eq 'cvs')
 
21
      || ($val eq '-P') || ($val eq '-q')) {
 
22
    #print "ignore $val\n";
 
23
    next;
 
24
  }
 
25
  elsif (($val eq '-d') || ($val eq '-q') || ($val eq '-z')) {
 
26
    my $tmp = shift @ARGV;
 
27
    #print "ignore $val $tmp\n";
 
28
    next;
 
29
  }
 
30
  elsif ($val eq '-r') {
 
31
    $branch = shift @ARGV;
 
32
    #print "branch = $branch\n";
 
33
    next;
 
34
  }
 
35
  elsif ($val =~ /^-/) {
 
36
    print "*** unknown switch: $val\n";
 
37
    exit 1;
 
38
  }
 
39
 
 
40
  if ($val =~ /\//) {
 
41
    push @dirs, $val;
 
42
    #print "dir = $val\n";
 
43
  }
 
44
  else {
 
45
    push @modules, $val;
 
46
    #print "module = $val\n";
 
47
  }
 
48
}
 
49
 
 
50
#print "dir = (".join(')(', @dirs)."), "
 
51
#      . "module = (".join(')(', @modules)."), "
 
52
#      . "branch = ($branch)\n";
 
53
 
 
54
if (!$branch) {
 
55
  $branch = 'HEAD';
 
56
}
 
57
 
 
58
my $status = 0;
 
59
foreach my $mod (@modules) {
 
60
  my $cmd = "config/fast-update.pl -r $branch -m $mod";
 
61
  #print "system \"$cmd\"\n";
 
62
  $status |= system $cmd;
 
63
}
 
64
foreach my $d (@dirs) {
 
65
  my $cmd = "config/fast-update.pl -r $branch -d $d -m all";
 
66
  #print "system \"$cmd\"\n";
 
67
  $status |= system $cmd;
 
68
}
 
69
 
 
70
exit $status;
 
71
 
 
72
 
 
73