aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Pipkin <j@dawnrazor.net>2012-11-30 02:29:03 -0600
committerJacob Pipkin <j@dawnrazor.net>2012-11-30 02:29:03 -0600
commitfaac7d812d12fde07338b7878db04e297fdb2540 (patch)
tree3ac215d5262126ddc702a00947d86e55ceea7f57
parentac21b44d8440a42a91df093a252ec04641679bbd (diff)
downloadsbotools2-faac7d812d12fde07338b7878db04e297fdb2540.tar.xz
die as we used to if a provided sbo doesnt exist, say the sbos name when asking about options
-rwxr-xr-xsboupgrade10
1 files changed, 6 insertions, 4 deletions
diff --git a/sboupgrade b/sboupgrade
index 209bd3a..fa3cac6 100755
--- a/sboupgrade
+++ b/sboupgrade
@@ -92,6 +92,8 @@ if ($no_reqs or $non_int) {
}
for my $sbo (@$build_queue) {
$locations{$sbo} = get_sbo_location ($sbo);
+ die "Unable to location $sbo in the SlackBuilds.org tree.\n" unless
+ defined $locations{$sbo};
}
sub get_readme_path ($) {
@@ -128,11 +130,11 @@ sub get_opts ($) {
}
# provide an opportunity to set options
-sub ask_opts ($) {
+sub ask_opts {
exists $_[0] or script_error 'ask_opts requires an argument';
- my $readme = shift;
+ my ($sbo, $readme) = @_;
say "\n". $readme;
- print "\nIt looks this slackbuild has options; would you like to set any";
+ print "\nIt looks $sbo has options; would you like to set any";
print ' when the slackbuild is run? [n] ';
if (<STDIN> =~ /^[Yy]/) {
my $ask = sub () {
@@ -167,7 +169,7 @@ sub user_prompt {
$commands{$sbo} = $cmds if defined $cmds;
# check for options mentioned in the README
my $opts = 0;
- $opts = ask_opts $readme if get_opts $readme;
+ $opts = ask_opts ($sbo, $readme) if get_opts $readme;
print "\n". $readme unless $opts;
$options{$sbo} = $opts if $opts;