Changeset 24085
- Timestamp:
- 07/11/19 19:28:09 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/etc/environment.sh
r23763 r24085 1 #ISSM_DIR and ISSM_ARCH should have been defined already in your shell settings file (.bashrc, .cshrc, etc ...) 2 1 # Modifies path-related envrionment variables based on which external packages 2 # have been installed. 3 # 4 # ISSM_DIR and ISSM_ARCH should have been defined already in your shell 5 # settings file (i.e. .bashrc, .cshrc). 6 7 ## Functions 8 # 3 9 pathprepend(){ #{{{ 4 10 if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then … … 22 28 } #}}} 23 29 libpathprepend(){ #{{{ 24 if [ -d "$1" ] && [[ ":$LD_LIBRARY_PATH:" != *":$1:"* ]]; then 25 export LD_LIBRARY_PATH="$1:$LD_LIBRARY_PATH" 26 fi 27 if [ -d "$1" ] && [[ ":$LD_RUN_PATH:" != *":$1:"* ]]; then 28 export LD_RUN_PATH="$1:$LD_RUN_PATH" 30 if [ -d "$1" ]; then 31 if [ -z $LD_LIBRARY_PATH ]; then 32 export LD_LIBRARY_PATH="$1" 33 elif [[ ":$LD_LIBRARY_PATH:" != *":$1:"* ]]; then 34 export LD_LIBRARY_PATH="$1:$LD_LIBRARY_PATH" 35 fi 36 if [ -z $LD_RUN_PATH ]; then 37 export LD_RUN_PATH="$1" 38 elif [[ ":$LD_RUN_PATH:" != *":$1:"* ]]; then 39 export LD_RUN_PATH="$1:$LD_RUN_PATH" 40 fi 29 41 fi 30 42 } #}}} 31 43 libpathappend(){ #{{{ 32 if [ -d "$1" ] && [[ ":$LD_LIBRARY_PATH:" != *":$1:"* ]]; then 33 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$1" 34 fi 35 if [ -d "$1" ] && [[ ":$LD_RUN_PATH:" != *":$1:"* ]]; then 36 export LD_RUN_PATH="$LD_RUN_PATH:$1" 44 if [ -d "$1" ]; then 45 if [ -z $LD_LIBRARY_PATH ]; then 46 export LD_LIBRARY_PATH=$1 47 elif [[ ":$LD_LIBRARY_PATH:" != *":$1:"* ]]; then 48 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$1" 49 fi 50 if [ -z $LD_RUN_PATH ]; then 51 export LD_RUN_PATH=$1 52 elif [[ ":$LD_RUN_PATH:" != *":$1:"* ]]; then 53 export LD_RUN_PATH="$LD_RUN_PATH:$1" 54 fi 37 55 fi 38 56 } #}}} 39 57 dylibpathprepend(){ #{{{ 40 if [ -d "$1" ] && [[ ":$DYLD_LIBRARY_PATH:" != *":$1:"* ]]; then 41 export DYLD_LIBRARY_PATH="$1:$DYLD_LIBRARY_PATH" 42 fi 43 if [ -d "$1" ] && [[ ":$LD_RUN_PATH:" != *":$1:"* ]]; then 44 export LD_RUN_PATH="$1:$LD_RUN_PATH" 58 if [ -d "$1" ]; then 59 if [ -z $DYLD_LIBRARY_PATH ]; then 60 export DYLD_LIBRARY_PATH=$1 61 elif [[ ":$DYLD_LIBRARY_PATH:" != *":$1:"* ]]; then 62 export DYLD_LIBRARY_PATH="$1:$DYLD_LIBRARY_PATH" 63 fi 64 if [ -z $LD_RUN_PATH ]; then 65 export LD_RUN_PATH=$1 66 elif [[ ":$LD_RUN_PATH:" != *":$1:"* ]]; then 67 export LD_RUN_PATH="$1:$LD_RUN_PATH" 68 fi 45 69 fi 46 70 } #}}} 47 71 dylibpathappend(){ #{{{ 48 if [ -d "$1" ] && [[ ":$DYLD_LIBRARY_PATH:" != *":$1:"* ]]; then 49 export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$1" 50 fi 51 if [ -d "$1" ] && [[ ":$LD_RUN_PATH:" != *":$1:"* ]]; then 52 export LD_RUN_PATH="$LD_RUN_PATH:$1" 53 fi 54 } #}}} 55 56 #FIXME: during installation packages are installed one by one but environment.sh was sourced 57 #before so new packages are NOT in the path. 58 #may resource environment.sh with: 59 #if [ -z $(echo "$PATH" | grep "$MATLAB_DIR") ]; then export $PATH...; fi 60 61 #Windows compilers: 72 if [ -d "$1" ]; then 73 if [ -z $DYLD_LIBRARY_PATH ]; then 74 export DYLD_LIBRARY_PATH=$1 75 elif [[ ":$DYLD_LIBRARY_PATH:" != *":$1:"* ]]; then 76 export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$1" 77 fi 78 if [ -z $LD_RUN_PATH ]; then 79 export LD_RUN_PATH=$1 80 elif [[ ":$LD_RUN_PATH:" != *":$1:"* ]]; then 81 export LD_RUN_PATH="$LD_RUN_PATH:$1" 82 fi 83 fi 84 } #}}} 85 86 # FIXME: during installation packages are installed one by one but 87 # environment.sh was sourced before so new packages are NOT in the path. May 88 # source environment.sh again with: 89 # if [ -z $(echo "$PATH" | grep "$MATLAB_DIR") ]; then export $PATH...; fi 90 91 # Windows compilers: 62 92 if [[ "$ISSM_ARCH" == "cygwin-intel" ]]; then 63 93 source $ISSM_DIR/externalpackages/windows/windows_environment.sh 64 94 fi 65 95 66 # Load ISSM scripts96 # Load ISSM scripts 67 97 pathappend "$ISSM_DIR/scripts" 68 98 69 #GMT70 99 GMT_DIR="$ISSM_DIR/externalpackages/gmt/install" 71 100 if [ -d "$GMT_DIR" ]; then
Note:
See TracChangeset
for help on using the changeset viewer.