|
1 #!/bin/perl |
|
2 # |
|
3 # This Source Code Form is subject to the terms of the Mozilla Public |
|
4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
6 |
|
7 # ----------------------------------------------------------------- |
|
8 # |
|
9 # explode.pl -- Unpack .jar files into bin, lib, include directories |
|
10 # |
|
11 # syntax: perl explode.pl |
|
12 # |
|
13 # Description: |
|
14 # explode.pl unpacks the .jar files created by the NSPR build |
|
15 # procedure. |
|
16 # |
|
17 # Suggested use: After copying the platform directories to |
|
18 # /s/b/c/nspr20/<release>. CD to /s/b/c/nspr20/<release> and |
|
19 # run explode.pl. This will unpack the jar files into bin, lib, |
|
20 # include directories. |
|
21 # |
|
22 # ----------------------------------------------------------------- |
|
23 |
|
24 @dirs = `ls -d *.OBJ*`; |
|
25 |
|
26 foreach $dir (@dirs) { |
|
27 chop($dir); |
|
28 if (-l $dir) { |
|
29 print "Skipping symbolic link $dir\n"; |
|
30 next; |
|
31 } |
|
32 print "Unzipping $dir/mdbinary.jar\n"; |
|
33 system ("unzip", "-o", "$dir/mdbinary.jar", |
|
34 "-d", "$dir"); |
|
35 system ("rm", "-rf", "$dir/META-INF"); |
|
36 mkdir "$dir/include", 0755; |
|
37 print "Unzipping $dir/mdheader.jar\n"; |
|
38 system ("unzip", "-o", "-aa", |
|
39 "$dir/mdheader.jar", |
|
40 "-d", "$dir/include"); |
|
41 system ("rm", "-rf", "$dir/include/META-INF"); |
|
42 } |
|
43 # --- end explode.pl ---------------------------------------------- |