explode.pl 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. # explode.pl -- Unpack .jar files into bin, lib, include directories
  9. #
  10. # syntax: perl explode.pl
  11. #
  12. # Description:
  13. # explode.pl unpacks the .jar files created by the NSPR build
  14. # procedure.
  15. #
  16. # Suggested use: After copying the platform directories to
  17. # /s/b/c/nspr20/<release>. CD to /s/b/c/nspr20/<release> and
  18. # run explode.pl. This will unpack the jar files into bin, lib,
  19. # include directories.
  20. #
  21. # -----------------------------------------------------------------
  22. @dirs = `ls -d *.OBJ*`;
  23. foreach $dir (@dirs) {
  24. chop($dir);
  25. if (-l $dir) {
  26. print "Skipping symbolic link $dir\n";
  27. next;
  28. }
  29. print "Unzipping $dir/mdbinary.jar\n";
  30. system ("unzip", "-o", "$dir/mdbinary.jar",
  31. "-d", "$dir");
  32. system ("rm", "-rf", "$dir/META-INF");
  33. mkdir "$dir/include", 0755;
  34. print "Unzipping $dir/mdheader.jar\n";
  35. system ("unzip", "-o", "-aa",
  36. "$dir/mdheader.jar",
  37. "-d", "$dir/include");
  38. system ("rm", "-rf", "$dir/include/META-INF");
  39. }
  40. # --- end explode.pl ----------------------------------------------