michael@0: #!/bin/perl michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: # ----------------------------------------------------------------- michael@0: # michael@0: # explode.pl -- Unpack .jar files into bin, lib, include directories michael@0: # michael@0: # syntax: perl explode.pl michael@0: # michael@0: # Description: michael@0: # explode.pl unpacks the .jar files created by the NSPR build michael@0: # procedure. michael@0: # michael@0: # Suggested use: After copying the platform directories to michael@0: # /s/b/c/nspr20/. CD to /s/b/c/nspr20/ and michael@0: # run explode.pl. This will unpack the jar files into bin, lib, michael@0: # include directories. michael@0: # michael@0: # ----------------------------------------------------------------- michael@0: michael@0: @dirs = `ls -d *.OBJ*`; michael@0: michael@0: foreach $dir (@dirs) { michael@0: chop($dir); michael@0: if (-l $dir) { michael@0: print "Skipping symbolic link $dir\n"; michael@0: next; michael@0: } michael@0: print "Unzipping $dir/mdbinary.jar\n"; michael@0: system ("unzip", "-o", "$dir/mdbinary.jar", michael@0: "-d", "$dir"); michael@0: system ("rm", "-rf", "$dir/META-INF"); michael@0: mkdir "$dir/include", 0755; michael@0: print "Unzipping $dir/mdheader.jar\n"; michael@0: system ("unzip", "-o", "-aa", michael@0: "$dir/mdheader.jar", michael@0: "-d", "$dir/include"); michael@0: system ("rm", "-rf", "$dir/include/META-INF"); michael@0: } michael@0: # --- end explode.pl ----------------------------------------------