aboutsummaryrefslogtreecommitdiff
path: root/sboinstall
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-09-07 00:26:22 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-09-07 00:26:22 +0200
commitda1b7f300ad26b9410c11ef0e5c49b783cc29c67 (patch)
tree95fe851682cfd3305c3d5551f41e9a0017dd7a9a /sboinstall
parent50f048b798478ba98c6e8043b7e518815f9f8c3a (diff)
downloadsbotools2-da1b7f300ad26b9410c11ef0e5c49b783cc29c67.tar.xz
sbo*, SBO::Lib::*: make use of prompt() for getting user input
Diffstat (limited to 'sboinstall')
-rwxr-xr-xsboinstall5
1 files changed, 2 insertions, 3 deletions
diff --git a/sboinstall b/sboinstall
index 6cb2d0d..05b493d 100755
--- a/sboinstall
+++ b/sboinstall
@@ -13,7 +13,7 @@
use 5.16.0;
use strict;
use warnings FATAL => 'all';
-use SBO::Lib qw/ %config _ERR_OPENFH get_arch get_build_queue get_installed_cpans get_installed_packages get_sbo_location get_sbo_locations merge_queues open_fh print_failures process_sbos show_version slackbuilds_or_fetch slurp usage_error user_prompt /;
+use SBO::Lib qw/ %config _ERR_OPENFH get_arch get_build_queue get_installed_cpans get_installed_packages get_sbo_location get_sbo_locations merge_queues open_fh print_failures process_sbos prompt show_version slackbuilds_or_fetch slurp usage_error user_prompt /;
use Getopt::Long qw(:config bundling);
use File::Basename;
use JSON::PP;
@@ -207,8 +207,7 @@ FIRST: for my $sbo (@$build_queue) {
exit 0 if @{ $build_queue } == 0;
say "\nInstall queue: " . join(' ', @$build_queue);
unless ($non_int) {
- print "\nAre you sure you wish to continue? [y]: ";
- exit 0 unless <STDIN> =~ /^[Yy\n]/;
+ exit 0 unless prompt("\nAre you sure you wish to continue?", default => 'yes');
}
if (defined $ctemp) {