Use for packagePath
authorStefan Vogel <sv@exept.de>
Fri, 06 Oct 2000 17:15:27 +0200
changeset 5654 96a2142a2c04
parent 5653 11188e843d12
child 5655 d1bc7daf5add
Use for packagePath
AbstractOperatingSystem.st
--- a/AbstractOperatingSystem.st	Fri Oct 06 17:14:25 2000 +0200
+++ b/AbstractOperatingSystem.st	Fri Oct 06 17:15:27 2000 +0200
@@ -3523,7 +3523,7 @@
                 pPath add:userPrivateSTXDir
             ]
         ].
-    ].
+    ].                                                              
 
     "/
     "/ STX_TOPDIR from the environment
@@ -3537,6 +3537,16 @@
     pPath add:'/opt/smalltalk'.
     pPath := pPath select:[:p | (p asFilename construct:'packages') exists].
     pPath := pPath collect:[:p | (p asFilename constructString:'packages')].
+
+   (p := OperatingSystem getEnvironment:'STX_PACKAGEPATH') notNil ifTrue:[
+        p := p asCollectionOfSubstringsSeparatedBy:$:.
+        p reverseDo:[:dir|
+            (pPath includes:dir) ifFalse:[
+                pPath addFirst:dir.
+            ].
+        ].
+    ].
+
     ^ pPath
 
     "
@@ -4233,6 +4243,6 @@
 !AbstractOperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.45 2000-09-29 14:08:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.46 2000-10-06 15:15:27 stefan Exp $'
 ! !
 AbstractOperatingSystem initialize!