[Koha-patches] [PATCH] added TRUST_ENV that tells to _get_value to *not* ask for a value if allready
Marc Chantreux
marc.chantreux at biblibre.com
Fri May 2 23:11:51 CEST 2008
(this permit, for exemple, a wrapper to the install script using dialog).
---
Makefile.PL | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index bae8dbc..8d4e9fa 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1143,13 +1143,20 @@ sub _get_value {
return $install_log_values{$key};
}
+ my $val;
# override default value from environment
if (exists $ENV{$key}) {
- $default = $ENV{$key};
- $msg .= " (default from environment)";
+ if (exists $ENV{TRUST_ENV}) {
+ $val = $ENV{$key};
+ goto VARSET
+ } else {
+ $default = $ENV{$key};
+ $msg .= " (default from environment)";
+ }
}
+ $val = prompt($msg, $default);
- my $val = prompt($msg, $default);
+ VARSET:
while (exists $valid_values->{$key} and
$val ne $default and
--
1.5.5
More information about the Koha-patches
mailing list