Changeset 500


Ignore:
Timestamp:
Sep 20, 2004, 3:36:34 PM (17 years ago)
Author:
kake
Message:

Fix install problem with blank script_name.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Changes

    r499 r500  
    22        Added backlinks link to navbar.
    33        Added some anti-robot tags to certain pages.
     4        Fixed bug in install procedure - blank script_name should now get
     5          installed as index.cgi
    46
    570.40    18 September 2004
  • trunk/lib/OpenGuides/Build.pm

    r499 r500  
    6161
    6262    print "Installing scripts to $install_directory:\n";
     63    # Allow for blank script_name - assume "index.cgi".
     64        my $script_filename = $script_name || "index.cgi";
    6365    if ( $FAKE ) {
    64         print "wiki.cgi -> $install_directory/$script_name (FAKE)\n";
     66        print "wiki.cgi -> $install_directory/$script_filename (FAKE)\n";
    6567    } else {
    66         if ( $script_name ne "wiki.cgi" ) {
    67             File::Copy::copy("wiki.cgi", $script_name)
    68                 or die "Can't copy('wiki.cgi', '$script_name'): $!";
     68        if ( $script_filename ne "wiki.cgi" ) {
     69            File::Copy::copy("wiki.cgi", $script_filename)
     70                or die "Can't copy('wiki.cgi', '$script_filename'): $!";
    6971        }
    70         my $copy = $self->copy_if_modified( $script_name, $install_directory );
     72        my $copy = $self->copy_if_modified(
     73                                            $script_filename,
     74                                            $install_directory
     75                                          );
    7176        if ( $copy ) {
    7277            $self->fix_shebang_line($copy);
    7378            $self->make_executable($copy);
    7479        } else {
    75             print "Skipping $install_directory/$script_name (unchanged)\n";
     80            print "Skipping $install_directory/$script_filename (unchanged)\n";
    7681        }
    77         print "(Really: wiki.cgi -> $install_directory/$script_name)\n"
    78             unless $script_name eq "wiki.cgi";
     82        print "(Really: wiki.cgi -> $install_directory/$script_filename)\n"
     83            unless $script_filename eq "wiki.cgi";
    7984    }
    8085
Note: See TracChangeset for help on using the changeset viewer.