source: trunk/third/firefox/config/zipchrome.pl @ 21695

Revision 21695, 2.2 KB checked in by rbasch, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21694, which included commits to RCS files with non-trunk default branches.
Line 
1#!perl
2#
3# The contents of this file are subject to the Netscape Public
4# License Version 1.1 (the "License"); you may not use this file
5# except in compliance with the License. You may obtain a copy of
6# the License at http://www.mozilla.org/NPL/
7
8# Software distributed under the License is distributed on an "AS
9# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10# implied. See the License for the specific language governing
11# rights and limitations under the License.
12
13# The Original Code is Mozilla Communicator client code, released
14# March 31, 1998.
15#
16# The Initial Developer of the Original Code is Netscape
17# Communications Corporation. Portions created by Netscape are
18# Copyright (C) 1998-1999 Netscape Communications Corporation. All
19# Rights Reserved.
20#
21# Contributor(s):
22# Sean Su <ssu@netscape.com>
23#
24
25# Make sure there are at least four arguments
26if(($#ARGV < 2) ||
27  ((!($ARGV[0] =~ /^win32$/i)) &&
28   (!($ARGV[0] =~ /^mac$/i)) &&
29   (!($ARGV[0] =~ /^unix$/i))) ||
30  ((!($ARGV[1] =~ /^update$/i)) &&
31   (!($ARGV[1] =~ /^noupdate$/i))))
32{
33  PrintUsage();
34  exit(1);
35}
36
37require "$ENV{MOZ_SRC}/mozilla/config/zipcfunc.pl";
38
39if($#ARGV == 2)
40{
41  if(&ZipChrome($ARGV[0], $ARGV[1], $ARGV[2], $ARGV[2]) != 0)
42  {
43    die "\n Error: ZipChrome($ARGV[0], $ARGV[1], $ARGV[2], $ARGV[2])\n";
44  }
45}
46else
47{
48  if(&ZipChrome($ARGV[0], $ARGV[1], $ARGV[2], $ARGV[3]) != 0)
49  {
50    die "\n Error: ZipChrome($ARGV[0], $ARGV[1], $ARGV[2], $ARGV[3])\n";
51  }
52}
53exit(0);
54
55sub PrintUsage()
56{
57  print "usage: $0 <os> <update> <source path> [target path]
58
59       os                : win32, mac, unix
60
61       update            : update    - enables time/date compare file update of chrome archives
62                           noupdate  - disables time/date compare file update of chrome archives.
63                                       it will always update chrome files regardless of time/date stamp.
64
65       source path       : path to where the chrome dir is at
66
67       target path       : (optional) path to where the chrome jar files should be copied to
68
69              ie: $0 update $ENV{MOZ_SRC}\\mozilla\\dist\\win32_d.obj\\tmpchrome $ENV{MOZ_SRC}\\mozilla\\dist\\win32_d.obj\\bin\\chrome
70       \n";
71}
72
Note: See TracBrowser for help on using the repository browser.