|
|
| 374 |
''' |
374 |
''' |
| 375 |
|
375 |
|
| 376 |
script = "#!/bin/bash \n#### \n# Environment setting script. Automatically generated by Bake\n####\n\n" |
376 |
script = "#!/bin/bash \n#### \n# Environment setting script. Automatically generated by Bake\n####\n\n" |
| 377 |
script = script + "echo \"> Call with . " + fileName + " or source " + fileName + "\"\n" |
377 |
script = script + "if [ \"${BASH_SOURCE:-}\" == \"${0}\" ]; then \n" + \ |
|
|
378 |
" echo \"> Call with . bakeSetEnv.sh or source bakeSetEnv.sh\" \n" + \ |
| 379 |
" exit 1 \n" + \ |
| 380 |
"fi \n\n" |
| 381 |
|
| 378 |
self._binpaths.add(self._bin_path()) |
382 |
self._binpaths.add(self._bin_path()) |
| 379 |
self._libpaths.add(self._lib_path()) |
383 |
self._libpaths.add(self._lib_path()) |
| 380 |
|
384 |
|
|
|
| 411 |
''' Format the variable to be added on the system. |
415 |
''' Format the variable to be added on the system. |
| 412 |
''' |
416 |
''' |
| 413 |
|
417 |
|
| 414 |
returnString = " export " + variableName + "=$" + variableName |
418 |
returnString = " export " + variableName + "=\"${" + variableName + ":+${" + variableName + "}:}" |
| 415 |
for element in vectorPath: |
419 |
for element in vectorPath: |
| 416 |
returnString = returnString + ":" + element |
420 |
returnString = returnString + element + ":" |
| 417 |
|
421 |
|
|
|
422 |
# Strip extra ':' |
| 423 |
returnString = returnString[:-1] |
| 424 |
|
| 425 |
returnString = returnString + "\"" |
| 418 |
return returnString |
426 |
return returnString |
| 419 |
|
427 |
|
| 420 |
def replace_variables(self, string): |
428 |
def replace_variables(self, string): |