cvs: pearweb /public_html go-pear
| From: | Stig Bakken | Date: | Fri, 10 Jan 2003 01:47:04 +0000 |
| Subject: | cvs: pearweb /public_html go-pear | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-8155@lists.php.net to get a copy of this message | ||
ssb Thu Jan 9 20:47:04 2003 EDT
Modified files:
/pearweb/public_html go-pear
Log:
* Darwin fix
Index: pearweb/public_html/go-pear
diff -u pearweb/public_html/go-pear:1.29 pearweb/public_html/go-pear:1.30
--- pearweb/public_html/go-pear:1.29 Thu Jan 2 17:38:39 2003
+++ pearweb/public_html/go-pear Thu Jan 9 20:47:04 2003
@@ -16,7 +16,7 @@
# | Stig Sæther Bakken <stig@php.net> |
# +----------------------------------------------------------------------+
#
-# $Id: go-pear,v 1.29 2003/01/02 22:38:39 ssb Exp $
+# $Id: go-pear,v 1.30 2003/01/10 01:47:04 ssb Exp $
#
# Automatically download all the files needed to run the "pear" command
# (the PEAR package installer). Requires PHP 4.1.0 or newer.
@@ -238,16 +238,18 @@
@dl('zlib.sl');
} elseif (PHP_OS == 'AIX') {
@dl('zlib.a');
+ } elseif (PHP_OS == 'OSX') {
+ @dl('zlib.bundle');
} else {
@dl('zlib.so');
}
}
if (!extension_loaded('zlib')) {
$urltemplate = 'http://pear.php.net/get/%s?uncompress=yes';
- $have_gzip = false;
+ $have_zlib = false;
} else {
$urltemplate = 'http://pear.php.net/get/%s';
- $have_gzip = true;
+ $have_zlib = true;
}
if ($install_pfc) {
@@ -302,7 +304,7 @@
$ext = substr($tarball['PEAR'], $dot+1);
include_once 'Archive/Tar.php';
-$tar = &new Archive_Tar($tarball['PEAR'], $have_gzip);
+$tar = &new Archive_Tar($tarball['PEAR'], $have_zlib);
if (!$tar->extractModify($ptmp, $pkg)) {
bail("failed!\n");
}
@@ -395,9 +397,8 @@
}
fclose($fp);
fclose($wp);
- $perms = fileperms($pear_cmd);
+ chmod($tmpfile, fileperms($pear_cmd));
rename($tmpfile, $pear_cmd);
- chmod($pear_cmd, $perms);
print "ok\n";
} else {
print "failed\n";
@@ -408,7 +409,7 @@
$pear_cmd = $bin_dir . DIRECTORY_SEPARATOR . 'pear';
-// check that the installed pear and the one in tha path are the same (if any)
+// check whether the installed pear and the one in the path are the same
$pear_old = which('pear', $bin_dir);
if ($pear_old && $pear_old != $pear_cmd) {
// check if it is a link or symlink