diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-05 20:07:25 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-05 20:07:25 +0000 |
commit | f22b48724942fc07423c7a3c4540500c5bb4200a (patch) | |
tree | fe295c46f0f0afc27b827b0f7829c22a70e813d2 /make/configure.pm | |
parent | b0e469b0bbdbc76692364e1f52ef613cc02a2a06 (diff) |
Fix for feature request in bug #262, needs a bit of QA. Simpler prompting for gnutls cert generation in configure, we now use our nice configuration system to prompt for the more important details,
which we use to fill in a certtool template. Much nicer.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6890 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'make/configure.pm')
-rw-r--r-- | make/configure.pm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/make/configure.pm b/make/configure.pm index d151629f8..dd2dc9089 100644 --- a/make/configure.pm +++ b/make/configure.pm @@ -11,7 +11,7 @@ package make::configure; use Exporter 'import'; use POSIX; use make::utilities; -@EXPORT = qw(promptnumeric dumphash is_dir getmodules getrevision getcompilerflags getlinkerflags getdependencies resolve_directory yesno showhelp); +@EXPORT = qw(promptnumeric dumphash is_dir getmodules getrevision getcompilerflags getlinkerflags getdependencies resolve_directory yesno showhelp promptstring); my $no_svn = 0; @@ -148,6 +148,18 @@ sub promptnumeric($$) } } +sub promptstring($$) +{ + my ($prompt,$default) = @_; + my $var; + print "$prompt\n"; + print "[\033[1;32m$default\033[0m] -> "; + chomp($var = <STDIN>); + $var = $default if $var eq ""; + print "\n"; + return $var; +} + sub dumphash() { print "\n\033[1;32mPre-build configuration is complete!\033[0m\n\n"; |