diff options
Diffstat (limited to 'php-scssphp-bin.patch')
-rw-r--r-- | php-scssphp-bin.patch | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/php-scssphp-bin.patch b/php-scssphp-bin.patch index a941334..1513f17 100644 --- a/php-scssphp-bin.patch +++ b/php-scssphp-bin.patch @@ -1,21 +1,13 @@ diff --git a/bin/pscss b/bin/pscss -index 451f0fb..38f0a8e 100755 +index e986585..d68a875 100755 --- a/bin/pscss +++ b/bin/pscss -@@ -1,9 +1,14 @@ --#!/usr/bin/env php -+#!/usr/bin/php - <?php +@@ -17,7 +17,7 @@ if (version_compare(PHP_VERSION, '5.3') < 0) { + die('Requires PHP 5.3 or above'); + } - error_reporting(E_ALL); - --include 'scss.inc.php'; -+spl_autoload_register(function ($class) { -+ if (0 === strpos($class, 'Leafo\\ScssPhp\\')) { -+ $src = str_replace('\\', '/', $class) . '.php'; -+ @include_once $src; -+ } -+}); +-include __DIR__ . '/../scss.inc.php'; ++require_once '__PHPDIR__/Leafo/ScssPhp/autoload.php'; use Leafo\ScssPhp\Compiler; use Leafo\ScssPhp\Parser; |