summaryrefslogtreecommitdiffabout
path: root/lib/SlackBuild/Request/Loader/dir.pm
blob: 5e2af9da22a8a8b9e1bf43842c97c1a22b161038 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package SlackBuild::Request::Loader::dir;
use strict;
use warnings;
use File::Basename;
use File::Spec;

our $PRIORITY = 20;

sub Load {
    my ($class, $reqname) = @_;
    if (-d $reqname) {
	if (my $file =
             (glob File::Spec->catfile($reqname, '*.SlackBuild'))[0]) {
	    my ($package,$path) = fileparse($file, '.SlackBuild');
	    return { package => $package, slackbuild_uri => $path };
	}
    }
}

1;

Return to:

Send suggestions and report system problems to the System administrator.