Changeset 5385 for BOL/script_install


Ignore:
Timestamp:
Dec 5, 2024, 12:55:32 PM (8 days ago)
Author:
abarral
Message:

Add #!/bin/bash to compile.sh
Use do_compile_sh for IOIPSL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r5377 r5385  
    5555
    5656  log="$(pwd)/$component.log"
    57   echo "$command" > compile.sh
    58   echo "Compiling $component using $(\cat compile.sh) (log: $log) $(date)"
     57  printf "#!/bin/bash\n%s\n" "$command" > compile.sh
     58  echo "Compiling $component using $command (log: $log) $(date)"
    5959    chmod +x ./compile.sh
    6060    if ! ./compile.sh &> "$log"; then
     
    555555    ioipsllog="$(pwd)/ioipsl.log"
    556556    echo "Compiling IOIPSL, the interface library with Netcdf $(date) (log: $ioipsllog)"
    557 # in case ksh is not installed on the pc
     557    # in case ksh is not installed on the pc
    558558    if [[ ! -x /bin/ksh ]]; then
    559       sed -i''  -e 's/ksh/bash/' ins_m_prec
    560     fi
    561     echo "$jobcmd ./makeioipsl_fcm -j $make_j -arch $arch $optim_flag" > compile.sh
    562     chmod +x compile.sh
    563     echo "Compiling IOIPSL using $(\cat compile.sh)"
    564     if ! ./compile.sh &> "$ioipsllog"; then
    565         echo "STOP: IOIPSL compile failed, exiting"; exit 1
    566     fi
     559      sed -i''  -e 's/ksh/bash/' ins_m_prec
     560    fi
     561    do_compile_sh "IOIPSL" "$jobcmd ./makeioipsl_fcm -j $make_j -arch $arch $optim_flag"
    567562
    568563    # Link to modipsl/bin
Note: See TracChangeset for help on using the changeset viewer.