From da1b7f300ad26b9410c11ef0e5c49b783cc29c67 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Wed, 7 Sep 2016 00:26:22 +0200 Subject: sbo*, SBO::Lib::*: make use of prompt() for getting user input --- SBO-Lib/lib/SBO/Lib/Build.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'SBO-Lib/lib/SBO/Lib/Build.pm') diff --git a/SBO-Lib/lib/SBO/Lib/Build.pm b/SBO-Lib/lib/SBO/Lib/Build.pm index a0ff814..fced993 100644 --- a/SBO-Lib/lib/SBO/Lib/Build.pm +++ b/SBO-Lib/lib/SBO/Lib/Build.pm @@ -6,7 +6,7 @@ use warnings; our $VERSION = '2.0'; -use SBO::Lib::Util qw/ :const script_error get_sbo_from_loc get_arch check_multilib uniq %config in /; +use SBO::Lib::Util qw/ :const prompt script_error get_sbo_from_loc get_arch check_multilib uniq %config in /; use SBO::Lib::Tree qw/ get_sbo_location /; use SBO::Lib::Info qw/ get_sbo_version check_x32 get_requires /; use SBO::Lib::Download qw/ get_sbo_downloads get_dl_fns get_filename_from_link check_distfiles /; @@ -535,8 +535,7 @@ sub process_sbos { return \@failures, $exit if $args{NON_INT}; say "Unable to download/verify source file(s) for $sbo:"; say " $fail"; - print 'Do you want to proceed? [n] '; - if ( =~ /^[yY]/) { + if (prompt('Do you want to proceed?' , default => 'no')) { next FIRST; } else { unlink for @symlinks; @@ -572,8 +571,7 @@ sub process_sbos { return \@failures, $exit if $count == @$todo; say "Failure encountered while building $sbo:"; say " $fail"; - print 'Do you want to proceed [n] '; - if ( =~ /^[yY]/) { + if (prompt('Do you want to proceed?', default => 'no')) { next FIRST; } else { unlink for @symlinks; -- cgit v1.2.3