forked from fink/fink-mirrors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inject.pl
executable file
·67 lines (51 loc) · 1.9 KB
/
inject.pl
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
64
#!/usr/bin/perl -w
#
# inject.pl - perl script to install a CVS version of one of the
# fink packages into an existing Fink tree
#
# Fink - a package manager that downloads source and installs it
# Copyright (c) 2001 Christoph Pfisterer
# Copyright (c) 2001-2016 The Fink Package Manager Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA.
#
$| = 1;
use 5.008_001; # perl 5.8.1 or newer required
use strict;
use FindBin;
use lib "$FindBin::RealBin/perlmod";
require Fink::Bootstrap;
### which package are we injecting?
my $package = "fink-mirrors";
### check if we're unharmed, and specify files for tarball
my ($file);
foreach $file (qw(NEWS _keys _list)) {
if (not -e $file) {
print "ERROR: Package incomplete, '$file' is missing.\n";
exit 1;
}
}
my $packagefiles = "COPYING NEWS README README.contacts install.sh postinstall.pl.in " .
"_keys _list _urls anonymous-cvs apache apt cpan ctan cvs-repository debian developer-cvs freebsd gimp gnome gnu kde master postgresql rsync sourceforge website" ;
my $info_script = "";
### run the inject_package script
import Fink::Bootstrap qw(&inject_package);
my $param = shift;
my $result = inject_package($package, $packagefiles, $info_script, $param);
if ($result == 1) {
exit 1;
}
### eof
exit 0;