home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl502b.zip / OS2 / ship.cmd < prev    next >
OS/2 REXX Batch file  |  1996-04-08  |  1KB  |  56 lines

  1. extproc perl -Sx
  2. #!perl
  3.  
  4. $zipfile = "perl502b";
  5. $refpath = "e:/perl5.002b3";
  6.  
  7. @files = grep(chomp, <DATA>);
  8.  
  9. open(F, "find . -type f -print|") or die "find";
  10. while (<F>) {
  11.   chomp;
  12.   next unless $_;
  13.   s'^./'';
  14.   next if m'~$';            # Emacs backups
  15.   next if -r "$refpath/$_"        # source code and regression tests
  16.        && !m'^(eg|lib|pod)/'i;        #     of standard distribution
  17.   next if m'^lib/ExtUtils/'i;        # only required for building Perl
  18.   next if m'\.diff$'i;            # diffs for patches
  19.   next if m'\.html$'i;            # HTML docs
  20.   next if m'\bSSB\b'i;            # SSB code
  21.   next if m'^OS2/.*\.zip$'i;        # ZIP files
  22.   next if m'^(ak|info|pod2ipf)/'i;    # my own stuff and zombies
  23.   next if m'^lib/auto/GDBM_File'i;    # GNU license
  24.   next if m'\.obj$'i || m'\.o$'i;    # intermediate files
  25.   next if m'\.lib$'i || m'\.a$'i;
  26.   next if m'^ext/(.*/)?(\w+)/(\w+)\.(bs|c|def|in)'i
  27.        && lc($2) == lc($3);        # generated files
  28.   next if m'^ext/SDBM_File/'i;        # no longer distributed
  29.   next if m'^ext/DB2CLI/const.h$'i;
  30.   next if m'^config.h$'i;
  31.   next if m'^config.sh$'i;
  32.   next if m'^makefile.mk$'i;
  33.   next if m'^writemain'i;
  34.   next if m'^main_'i;
  35.   next if m'^miniperl\.'i;
  36.   next if m'^sed\.'i;
  37.   next if m'^perl5x$'i;
  38.   next if m'^perl5.*\.(zip|def)$'i;
  39.   next if m'^OS2/save.cmd'i;
  40.   push @files, $_;
  41. }
  42. close(F);
  43.  
  44. open(F, "|zip -ru9@ $zipfile") or die "zip";
  45. foreach (@files) {
  46.   print F "$_\n";
  47. }
  48. close(F);
  49.  
  50. exit(0);
  51.  
  52. __END__
  53. README
  54. Artistic
  55. Copying
  56.