[Solar-svn] Revision 3001

pmjones at solarphp.com pmjones at solarphp.com
Mon Mar 17 10:12:57 CDT 2008


Solar binary: look up include-path relative to a solar-system installation


Modified: trunk/bin/solar
===================================================================
--- trunk/bin/solar	2008-03-14 03:04:54 UTC (rev 3000)
+++ trunk/bin/solar	2008-03-17 15:12:56 UTC (rev 3001)
@@ -34,12 +34,18 @@
  * Discover and set the include-path
  */
 
-$include_key = 'PHP_' . strtoupper($vendor) . '_INCLUDE_PATH';
+$vendor_key = 'PHP_' . strtoupper($vendor) . '_INCLUDE_PATH';
 switch (true) {
+
+// are we in a "solar system" installation? recognize this from the standard
+// directory structure and the physical file location within it.
+case (substr(__FILE__, -23) == '/source/solar/bin/solar'):
+    $include = substr(__FILE__, 0, -23) . '/include';
+    break;
     
-// the vendor-specific include path
-case (! empty($_SERVER[$include_key])):
-    $include = $_SERVER[$include_key];
+// use a vendor-specific include path?
+case (! empty($_SERVER[$vendor_key])):
+    $include = $_SERVER[$vendor_key];
     break;
     
 // fall back to the solar include path




More information about the Solar-svn mailing list