Permalink
Browse files

Merge pull request #1 from dboune/composer_modify

Composer modify
  • Loading branch information...
2 parents fd94a26 + 4d3c099 commit fbb74e9efc7df3c93549e12e08de478d88d635fc @Hounddog Hounddog committed May 15, 2012
Showing with 5 additions and 3 deletions.
  1. +1 −1 bin/phing
  2. +4 −2 bin/phing.php
View
@@ -20,7 +20,7 @@ done
if [ -z "$PHING_HOME" ] ; then
# echo "WARNING: PHING_HOME environment not set. Attempting to guess."
- PRG=$(readlink -f $0)
+ PRG=`test -L "$0" && readlink "$0" || echo "$0"`
PHING_HOME=`dirname "$PRG"`/..
View
@@ -7,8 +7,10 @@
* @version $Id$
*/
-if (file_exists(__DIR__ . '/../../../autoload.php')) {
- // phing is part of a composer installation
+// Use composers autoload.php if available
+if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
+ require_once __DIR__ . '/../vendor/autoload.php';
+} else if (file_exists(__DIR__ . '/../../../autoload.php')) {
require_once __DIR__ . '/../../../autoload.php';
}

0 comments on commit fbb74e9

Please sign in to comment.