Update of /cvsroot/fink/scripts/bindist
In directory sc8-pr-cvs1:/tmp/cvs-serv9188
Modified Files:
Tag: remis-bindist
buildcheck
Log Message:
Minor modifications to honor new environment
Index: buildcheck
===================================================================
RCS file: /cvsroot/fink/scripts/bindist/buildcheck,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- buildcheck 26 Apr 2003 23:16:33 -0000 1.1
+++ buildcheck 21 Dec 2003 23:52:03 -0000 1.1.2.1
@@ -1,6 +1,10 @@
#!/usr/bin/perl -w
+#
+# Checks if a given package is present, i.e. the deb file exists.
+# Returns 0 if package exists, overwise 1
-$| = 1;
+$| = 1; # flush buffers
+$! = 1; # return value for die
require 5.006; # perl 5.6.0 or newer required
use strict;
@@ -9,7 +13,7 @@
use Fink::Config qw($config $basepath);
my ($config, $configpath);
-$configpath = "/sw/etc/fink.conf";
+$configpath = "$ENV{FINK_PREFIX}/etc/fink.conf";
if (-f $configpath) {
$config = &Fink::Services::read_config($configpath);
} else {
@@ -19,7 +23,7 @@
Fink::Package->require_packages();
-my $LOGDIR = $ENV{LOGDIR} or die "You must set the environment variable LOGDIR before
running this script";
+my $BDLOGDIR = $ENV{BDLOGDIR} or die "You must set the environment variable BDLOGDIR
before running this script";
my $pkgspec = shift;
my $package = Fink::PkgVersion->match_package($pkgspec);
@@ -27,9 +31,11 @@
die "no package found for specification '$pkgspec'!\n";
}
unless ($package->is_present()) {
- open(NOTBUILT,">>$LOGDIR/NotBuilt") or die "can't open file for writing:
$LOGDIR/NotBuilt\n";
+ open(NOTBUILT,">>$BDLOGDIR/NotBuilt") or die "can't open file for writing:
$BDLOGDIR/NotBuilt\n";
my $pkgname = $package->get_name();
print NOTBUILT "$pkgname\n";
- close(NOTBUILT) or die "can't write file: $LOGDIR/NotBuilt\n";
+ close(NOTBUILT) or die "can't write file: $BDLOGDIR/NotBuilt\n";
+ exit 1;
}
+exit 0;
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits