1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
#!/usr/bin/env perl
#
# vim: set ts=4:noet
#
# Lib.pm
# shared functions for the sbo_ scripts.
#
# authors: Jacob Pipkin <j@dawnrazor.net>
# Luke Williams <xocel@iquidus.org>
# Andreas Guldstrand <andreas.guldstrand@gmail.com>
# license: WTFPL <http://sam.zoy.org/wtfpl/COPYING>
use 5.16.0;
use strict;
use warnings FATAL => 'all';
package SBO::Lib;
our $VERSION = '2.0';
use SBO::Lib::Util qw/ :all /;
use SBO::Lib::Info qw/ :all /;
use SBO::Lib::Repo qw/ :all /;
use SBO::Lib::Tree qw/ :all /;
use SBO::Lib::Pkgs qw/ :all /;
use SBO::Lib::Build qw/:all /;
use SBO::Lib::Readme qw/ :all /;
use SBO::Lib::Download qw/ :all /;
use Exporter 'import';
our @EXPORT_OK = (
@SBO::Lib::Util::EXPORT_OK,
@SBO::Lib::Info::EXPORT_OK,
@SBO::Lib::Repo::EXPORT_OK,
@SBO::Lib::Tree::EXPORT_OK,
@SBO::Lib::Pkgs::EXPORT_OK,
@SBO::Lib::Build::EXPORT_OK,
@SBO::Lib::Readme::EXPORT_OK,
@SBO::Lib::Download::EXPORT_OK,
);
our %EXPORT_TAGS = (
all => \@EXPORT_OK,
util => \@SBO::Lib::Util::EXPORT_OK,
info => \@SBO::Lib::Info::EXPORT_OK,
repo => \@SBO::Lib::Repo::EXPORT_OK,
tree => \@SBO::Lib::Tree::EXPORT_OK,
pkgs => \@SBO::Lib::Pkgs::EXPORT_OK,
build => \@SBO::Lib::Build::EXPORT_OK,
readme => \@SBO::Lib::Readme::EXPORT_OK,
download => \@SBO::Lib::Download::EXPORT_OK,
const => $SBO::Lib::Util::EXPORT_TAGS{const},
config => $SBO::Lib::Util::EXPORT_TAGS{config},
);
unless ($< == 0) {
warn "This script requires root privileges.\n";
exit _ERR_USAGE;
}
'ok';
__END__
|