bjori Tue Feb 6 20:24:22 2007 UTC
Modified files:
/phpdoc/scripts functable.php
Log:
Use `which` to locate `tar`
# Fixes path/to/tar on BSD
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/functable.php?r1=1.13&r2=1.14&diff_format=u
Index: phpdoc/scripts/functable.php
diff -u phpdoc/scripts/functable.php:1.13 phpdoc/scripts/functable.php:1.14
--- phpdoc/scripts/functable.php:1.13 Tue Feb 6 07:11:06 2007
+++ phpdoc/scripts/functable.php Tue Feb 6 20:24:22 2007
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Authors: Sean Coates <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
-$Id: functable.php,v 1.13 2007/02/06 07:11:06 sean Exp $
+$Id: functable.php,v 1.14 2007/02/06 20:24:22 bjori Exp $
*/
// direct the output of this file into phpdoc/phpbook/phpbook-xsl/version.xml
@@ -142,7 +142,13 @@
file_put_contents(PATH_TMP . '/pecl_tarball.tgz',
file_get_contents($remoteTarball));
// should probably do this as natively as possible.. @@@fixme
- exec('/bin/tar zxf pecl_tarball.tgz');
+ exec('which tar', $tar, $success);
+ if($success == 0) {
+ exec($tar . 'zxf pecl_tarball.tgz');
+ } else {
+ fwrite(STDERR, " WARN: CAN'T FIND `tar`! .oO(what kind of system are
you running?)");
+ }
+ return !$success;
}
function checkout_tag($tag)