Changeset 1145

Show
Ignore:
Timestamp:
01/28/08 15:08:26 (7 months ago)
Author:
earle
Message:

Add '--force' option to Build.PL to skip all questioning.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Build.PL

    r1128 r1145  
    22use lib "lib"; 
    33use Data::Dumper; 
     4use Getopt::Long; 
    45 
    56eval { 
     
    1213die "Problem loading OpenGuides module or a missing module\n\n$@.\n" if $@; 
    1314 
    14 print <<EOF; 
     15my $force; 
     16 
     17GetOptions('force' => \$force); 
     18 
     19unless ($force) { 
     20        print <<EOF; 
    1521 
    1622Beginning install process... if you already have an OpenGuides 
     
    2329my $continue = Module::Build->y_n("Continue with install?", "y"); 
    2430exit 0 unless $continue; 
     31} 
    2532 
    2633my $existing_config_file = 'wiki.conf'; 
     
    4653      send_moderation_notifications); 
    4754 
    48 my $skip_config = Module::Build->y_n("Skip OpenGuides configuration?", "n"); 
     55my $skip_config = $force ? 'y' : Module::Build->y_n("Skip OpenGuides configuration?", "n"); 
    4956if ( $skip_config ) { 
    5057    print <<EOF; 
  • trunk/INSTALL

    r1131 r1145  
    3333 
    3434Answer "n" to this question unless you really know what you're doing. 
    35 It's mainly there for developers. 
     35It's mainly there for developers. (If you already have a configuration 
     36file, and wish to use it without the build script asking you this 
     37question, run Build.PL with the option --force. This will also skip  
     38the "Continue with install?" question.) 
    3639 
    3740