aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-11 00:11:08 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-11 00:11:08 +0100
commitc95f0b44ba2f9ab743875e655a48bf7c634a6213 (patch)
tree7aec9719bd8cd1ff5bd71a799f8cb4feec296194
parent49410cd7cbf44be774f421db0d314c015d730796 (diff)
downloadsbotools2-c95f0b44ba2f9ab743875e655a48bf7c634a6213.tar.xz
Changed check of $sbo_home to $repo_path
-rw-r--r--SBO-Lib/lib/SBO/Lib.pm15
1 files changed, 7 insertions, 8 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm
index 664c0b9..e9eab3a 100644
--- a/SBO-Lib/lib/SBO/Lib.pm
+++ b/SBO-Lib/lib/SBO/Lib.pm
@@ -220,16 +220,15 @@ sub chk_slackbuilds_txt {
}
# check for the validity of new $config{SBO_HOME}
-sub check_home {
- my $sbo_home = $config{SBO_HOME};
- if (-d $sbo_home) {
- opendir(my $home_handle, $sbo_home);
- FIRST: while (my $dir = readdir $home_handle) {
+sub check_repo {
+ if (-d $repo_path) {
+ opendir(my $repo_handle, $repo_path);
+ FIRST: while (my $dir = readdir $repo_handle) {
next FIRST if $dir =~ /^\.[\.]{0,1}$/;
- usage_error("$sbo_home exists and is not empty. Exiting.\n");
+ usage_error("$repo_path exists and is not empty. Exiting.\n");
}
} else {
- make_path($sbo_home) or usage_error("Unable to create $sbo_home.\n");
+ make_path($repo_path) or usage_error("Unable to create $repo_path.\n");
}
return 1;
}
@@ -334,7 +333,7 @@ sub generate_slackbuilds_txt {
# wrappers for differing checks and output
sub fetch_tree {
- check_home();
+ check_repo();
say 'Pulling SlackBuilds tree...';
pull_sbo_tree(), return 1;
}