Changeset 1145 for trunk/Build.PL


Ignore:
Timestamp:
Jan 28, 2008, 3:08:26 PM (14 years ago)
Author:
Earle Martin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.