Add hash/rehash commands at the end of the scripts in <coriolisEnv.py>.
This commit is contained in:
parent
724d92f816
commit
9fa65af1ec
|
@ -122,23 +122,23 @@ if __name__ == "__main__":
|
||||||
strippedPythonPath = stripPath ( "PYTHONPATH" )
|
strippedPythonPath = stripPath ( "PYTHONPATH" )
|
||||||
|
|
||||||
shellScriptSh = \
|
shellScriptSh = \
|
||||||
"""echo "%(MESSAGE)s";\n""" \
|
'echo "%(MESSAGE)s";\n' \
|
||||||
"""echo "Switching to Coriolis 2.x (%(buildDir)s)";\n""" \
|
'echo "Switching to Coriolis 2.x (%(buildDir)s)";\n' \
|
||||||
"""PATH="%(PATH)s";\n""" \
|
'PATH="%(PATH)s";\n' \
|
||||||
"""BOOTSTRAP_TOP="%(BOOTSTRAP_TOP)s";\n""" \
|
'BOOTSTRAP_TOP="%(BOOTSTRAP_TOP)s";\n' \
|
||||||
"""CORIOLIS_TOP="%(CORIOLIS_TOP)s";\n""" \
|
'CORIOLIS_TOP="%(CORIOLIS_TOP)s";\n' \
|
||||||
"""STRATUS_MAPPING_NAME="%(SYSCONF_DIR)s/stratus2sxlib.xml";\n""" \
|
'STRATUS_MAPPING_NAME="%(SYSCONF_DIR)s/stratus2sxlib.xml";\n' \
|
||||||
"""export PATH BOOTSTRAP_TOP CORIOLIS_TOP STRATUS_MAPPING_NAME;\n""" \
|
'export PATH BOOTSTRAP_TOP CORIOLIS_TOP STRATUS_MAPPING_NAME;\n' \
|
||||||
"""hash -r;\n"""
|
'hash -r;\n'
|
||||||
|
|
||||||
shellScriptCsh = \
|
shellScriptCsh = \
|
||||||
"""echo "%(MESSAGE)s";\n""" \
|
'echo "%(MESSAGE)s";\n' \
|
||||||
"""echo "Switching to Coriolis 2.x (%(buildDir)s)";\n""" \
|
'echo "Switching to Coriolis 2.x (%(buildDir)s)";\n' \
|
||||||
"""setenv PATH "%(PATH)s";\n""" \
|
'setenv PATH "%(PATH)s";\n' \
|
||||||
"""setenv BOOTSTRAP_TOP "%(BOOTSTRAP_TOP)s";\n""" \
|
'setenv BOOTSTRAP_TOP "%(BOOTSTRAP_TOP)s";\n' \
|
||||||
"""setenv CORIOLIS_TOP "%(CORIOLIS_TOP)s";\n""" \
|
'setenv CORIOLIS_TOP "%(CORIOLIS_TOP)s";\n' \
|
||||||
"""setenv STRATUS_MAPPING_NAME "%(SYSCONF_DIR)s/stratus2sxlib.xml";\n""" \
|
'setenv STRATUS_MAPPING_NAME "%(SYSCONF_DIR)s/stratus2sxlib.xml";\n' \
|
||||||
"""rehash\n;"""
|
'rehash\n;'
|
||||||
|
|
||||||
buildDir = buildType + "." + linkType
|
buildDir = buildType + "." + linkType
|
||||||
scriptDir = os.path.dirname ( os.path.abspath(__file__) )
|
scriptDir = os.path.dirname ( os.path.abspath(__file__) )
|
||||||
|
@ -176,18 +176,21 @@ if __name__ == "__main__":
|
||||||
strippedPythonPath = "%s/cumulus:" % (sitePackagesDir) + strippedPythonPath
|
strippedPythonPath = "%s/cumulus:" % (sitePackagesDir) + strippedPythonPath
|
||||||
strippedPythonPath = "%s/stratus:" % (sitePackagesDir) + strippedPythonPath
|
strippedPythonPath = "%s/stratus:" % (sitePackagesDir) + strippedPythonPath
|
||||||
|
|
||||||
shellScriptSh += """PYTHONPATH="%(PYTHONPATH)s";\n""" \
|
shellScriptSh += 'PYTHONPATH="%(PYTHONPATH)s";\n' \
|
||||||
"""export PYTHONPATH;\n"""
|
'export PYTHONPATH;\n'
|
||||||
shellScriptCsh += """setenv PYTHONPATH "%(PYTHONPATH)s";"""
|
shellScriptCsh += 'setenv PYTHONPATH "%(PYTHONPATH)s";'
|
||||||
|
|
||||||
if osType == "Darwin":
|
if osType == "Darwin":
|
||||||
shellScriptSh += """DYLD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";\n""" \
|
shellScriptSh += 'DYLD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";\n' \
|
||||||
"""export DYLD_LIBRARY_PATH;\n"""
|
'export DYLD_LIBRARY_PATH;\n'
|
||||||
shellScriptCsh += """setenv DYLD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";\n"""
|
shellScriptCsh += 'setenv DYLD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";\n'
|
||||||
else:
|
else:
|
||||||
shellScriptSh += """LD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";\n""" \
|
shellScriptSh += 'LD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";\n' \
|
||||||
"""export LD_LIBRARY_PATH;\n"""
|
'export LD_LIBRARY_PATH;\n'
|
||||||
shellScriptCsh += """setenv LD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";\n"""
|
shellScriptCsh += 'setenv LD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";\n'
|
||||||
|
|
||||||
|
shellScriptSh += "hash -r;\n"
|
||||||
|
shellScriptCSh += "rehash;\n"
|
||||||
|
|
||||||
if options.csh: shellScript = shellScriptCsh
|
if options.csh: shellScript = shellScriptCsh
|
||||||
else: shellScript = shellScriptSh
|
else: shellScript = shellScriptSh
|
||||||
|
|
Loading…
Reference in New Issue