nsprpub/admin/explode.pl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nsprpub/admin/explode.pl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,43 @@
     1.4 +#!/bin/perl
     1.5 +# 
     1.6 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 +
    1.10 +# -----------------------------------------------------------------
    1.11 +#
    1.12 +# explode.pl -- Unpack .jar files into bin, lib, include directories
    1.13 +#
    1.14 +# syntax: perl explode.pl
    1.15 +#
    1.16 +# Description:
    1.17 +# explode.pl unpacks the .jar files created by the NSPR build   
    1.18 +# procedure. 
    1.19 +#
    1.20 +# Suggested use: After copying the platform directories to
    1.21 +# /s/b/c/nspr20/<release>. CD to /s/b/c/nspr20/<release> and
    1.22 +# run explode.pl. This will unpack the jar files into bin, lib,
    1.23 +# include directories.
    1.24 +#
    1.25 +# -----------------------------------------------------------------
    1.26 +
    1.27 +@dirs = `ls -d *.OBJ*`;
    1.28 +
    1.29 +foreach $dir (@dirs) {
    1.30 +    chop($dir);
    1.31 +    if (-l $dir) {
    1.32 +        print "Skipping symbolic link $dir\n";
    1.33 +        next;
    1.34 +    }
    1.35 +    print "Unzipping $dir/mdbinary.jar\n";
    1.36 +    system ("unzip", "-o", "$dir/mdbinary.jar",
    1.37 +            "-d", "$dir");
    1.38 +    system ("rm", "-rf", "$dir/META-INF");
    1.39 +    mkdir "$dir/include", 0755;
    1.40 +    print "Unzipping $dir/mdheader.jar\n";
    1.41 +    system ("unzip", "-o", "-aa",
    1.42 +            "$dir/mdheader.jar",
    1.43 +            "-d", "$dir/include");
    1.44 +    system ("rm", "-rf", "$dir/include/META-INF");
    1.45 +}
    1.46 +# --- end explode.pl ----------------------------------------------

mercurial