stas        02/03/22 03:07:08

  Added:       bin      makeindex
  Log:
  - the script that will index the site
  
  Revision  Changes    Path
  1.1                  modperl-docs/bin/makeindex
  
  Index: makeindex
  ===================================================================
  #!/usr/bin/perl -w
  
  # do the indexing process
  # relies on setting of the following env varibles:
  #
  # the root of the site, without the trailing /
  # export MODPERL_SITE='http://localhost/modperl-site'
  #
  # the location of the swish-e, we need it to be set explicitly,
  # because on some machines, more than one version exists, and we need
  # the 2.1-dev + version
  # $ENV{SWISH_BINARY_PATH} = "/usr/lobal/bin/swish-e";
  #
  # both can be set in the user's startup file
  
  # on daedalus (the production server) we cannot modify the config file
  # so we do it here
  BEGIN {
      require Sys::Hostname;
      my $hostname = Sys::Hostname::hostname();
  
      if ($hostname && $hostname eq 'daedalus.apache.org') {
          $ENV{MODPERL_SITE} = 
"http://perl.apache.org/preview/modperl-docs/dst_html";;
          $ENV{SWISH_BINARY_PATH} = "/home/stas/bin/swish-e";
  
  #        unshift @INC,
  #            qw(
  #               /home/stas/lib/perl5/5.00503
  #               /home/stas/lib/perl5/site_perl/5.005
  #               /home/stas/lib/perl5/site_perl/
  #               /home/stas/lib/perl5/site_perl/
  #               /home/stas/lib/perl5/
  #              );
  
      }
  }
  
  use FindBin qw($Bin);
  use Cwd ();
  
  my $swish_binary = $ENV{SWISH_BINARY_PATH} || './swish-e';
  die "Cannot find swish-e at $swish_binary: $!" unless -x $swish_binary;
  
  my $cwd = Cwd::fastcwd();
  chdir "$Bin/../dst_html/search";
  
  # index
  my $command = "$swish_binary -S prog -c swish.conf";
  #print $command;
  system $command;
  
  chdir $cwd;
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to