Changeset 18921
- Timestamp:
- 05/30/06 16:02:26 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/trunk/modules/tweek/java/org/vrjuggler/tweek/EnvironmentServiceImpl.java
r18824 r18921 168 168 while ( (index = new_str.indexOf("$")) != -1 ) 169 169 { 170 if ( inputStr.substring(index, index + 2).equals("$(") )171 { 172 end_index = inputStr.indexOf(")");173 } 174 else if ( inputStr.substring(index, index + 2).equals("${") )175 { 176 end_index = inputStr.indexOf("}");170 if ( new_str.substring(index, index + 2).equals("$(") ) 171 { 172 end_index = new_str.indexOf(")"); 173 } 174 else if ( new_str.substring(index, index + 2).equals("${") ) 175 { 176 end_index = new_str.indexOf("}"); 177 177 } 178 178 else … … 181 181 } 182 182 183 env_var = inputStr.substring(index + 2, end_index);183 env_var = new_str.substring(index + 2, end_index); 184 184 185 185 // Treat $HOME as a special case since we can actually get its value … … 196 196 if ( value != null ) 197 197 { 198 new_str = inputStr.substring(0, index) + value +199 inputStr.substring(end_index + 1);198 new_str = new_str.substring(0, index) + value + 199 new_str.substring(end_index + 1); 200 200 } 201 201 else … … 203 203 System.err.println("WARNING: Environment variable " + env_var + 204 204 " has no value"); 205 new_str = inputStr.substring(0, index) +206 inputStr.substring(end_index + 1);205 new_str = new_str.substring(0, index) + 206 new_str.substring(end_index + 1); 207 207 } 208 208 } juggler/trunk/modules/tweek/java/org/vrjuggler/tweek/beans/BeanAttributes.java
r18824 r18921 25 25 *************** <auto-copyright.pl END do not edit this line> ***************/ 26 26 package org.vrjuggler.tweek.beans; 27 28 import org.vrjuggler.tweek.services.*; 27 29 28 30 import java.util.ArrayList; … … 212 214 protected static String expandEnvVars (String name) 213 215 { 216 EnvironmentService service = new EnvironmentServiceProxy(); 217 return service.expandEnvVars(name); 218 /* 214 219 String new_name = name; 215 220 int index, end_index; … … 248 253 249 254 return new_name; 255 */ 250 256 } 251 257
