diff options
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"; |