summaryrefslogtreecommitdiffstats
path: root/php-scssphp-bin.patch
blob: a941334cd7b9f35d62f684b547ec1118b8bb5ea7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/bin/pscss b/bin/pscss
index 451f0fb..38f0a8e 100755
--- a/bin/pscss
+++ b/bin/pscss
@@ -1,9 +1,14 @@
-#!/usr/bin/env php
+#!/usr/bin/php
 <?php
 
 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;
+    }
+});
 
 use Leafo\ScssPhp\Compiler;
 use Leafo\ScssPhp\Parser;