Author: earle Date: 2008-01-28 15:08:26 +0000 (Mon, 28 Jan 2008) New Revision: 1145
Modified: trunk/Build.PL trunk/INSTALL Log: Add '--force' option to Build.PL to skip all questioning.
Modified: trunk/Build.PL =================================================================== --- trunk/Build.PL 2008-01-24 10:03:23 UTC (rev 1144) +++ trunk/Build.PL 2008-01-28 15:08:26 UTC (rev 1145) @@ -1,6 +1,7 @@ use strict; use lib "lib"; use Data::Dumper; +use Getopt::Long;
eval { require Config::Tiny; @@ -11,8 +12,13 @@
die "Problem loading OpenGuides module or a missing module\n\n$@.\n" if $@;
-print <<EOF; +my $force;
+GetOptions('force' => $force); + +unless ($force) { + print <<EOF; + Beginning install process... if you already have an OpenGuides configuration file and you don't want to have to type in all your config parameters over again, abort this process now, copy that file to this @@ -22,6 +28,7 @@
my $continue = Module::Build->y_n("Continue with install?", "y"); exit 0 unless $continue; +}
my $existing_config_file = 'wiki.conf'; my $existing_config; @@ -45,7 +52,7 @@ content_above_navbar_in_html show_gmap_in_node_display send_moderation_notifications);
-my $skip_config = Module::Build->y_n("Skip OpenGuides configuration?", "n"); +my $skip_config = $force ? 'y' : Module::Build->y_n("Skip OpenGuides configuration?", "n"); if ( $skip_config ) { print <<EOF; ===========================================================================
Modified: trunk/INSTALL =================================================================== --- trunk/INSTALL 2008-01-24 10:03:23 UTC (rev 1144) +++ trunk/INSTALL 2008-01-28 15:08:26 UTC (rev 1145) @@ -32,7 +32,10 @@ "Skip OpenGuides configuration?"
Answer "n" to this question unless you really know what you're doing. -It's mainly there for developers. +It's mainly there for developers. (If you already have a configuration +file, and wish to use it without the build script asking you this +question, run Build.PL with the option --force. This will also skip +the "Continue with install?" question.)
"What type of database do you want the site to run on?"
openguides-commits@lists.openguides.org