Changeset 5407 for BOL/script_install


Ignore:
Timestamp:
Dec 13, 2024, 2:46:37 PM (7 weeks ago)
Author:
abarral
Message:

Better preservation of install path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r5405 r5407  
    536536      echo "STOP: missing nf-config or nc-config in \$PATH"; exit 1
    537537    fi
    538     local nc_path nf_path env_msg env_msg_tail
    539     nc_path=$(nc-config --prefix)
    540     nf_path=$(nf-config --prefix)
    541     env_msg="export PATH=\"$nc_path/bin"
    542     if [[ $nf_path != "$nc_path" ]]; then
    543       env_msg="$env_msg:$nf_path/bin"
    544     fi
    545     env_msg="$env_msg:\$PATH\""
     538    local env_msg env_msg_tail
    546539    env_msg_tail="# netcdf bin path auto-added by install_lmdz.sh"
    547     env_msg="$env_msg $env_msg_tail"
    548     if ! < "$default_env_path" grep -q "$env_msg"; then
     540    env_msg="export PATH=\"$PATH:\$PATH\" $env_msg_tail"
     541    if ! < "$default_env_path" grep -q "$env_msg_tail"; then
    549542      sed -i "1s@^@$env_msg\n@" "$default_env_path"
    550543    fi
     
    588581
    589582    cd "$MODEL/modipsl/modeles/IOIPSL"
    590     ioipsllog="$(pwd)/ioipsl.log"
    591     echo "Compiling IOIPSL, the interface library with Netcdf $(date) (log: $ioipsllog)"
     583    echo "Compiling IOIPSL, the interface library with Netcdf $(date)"
    592584    # in case ksh is not installed on the pc
    593585    if [[ ! -x /bin/ksh ]]; then
Note: See TracChangeset for help on using the changeset viewer.