Changeset 1611


Ignore:
Timestamp:
08/07/09 12:31:59 (16 years ago)
Author:
Eric.Larour
Message:

minor tweaks for windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/cron/nightlyrun.sh

    r1604 r1611  
    66function timer()
    77{
    8         #if no input: return time, else return elapsed time
    98        if [[ $# -eq 0 ]]; then
    109                echo $(date '+%s')
     
    2221        fi
    2322}
    24 function today_date()
     23function todaydate()
    2524{
    26         #return today date
     25        export today=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'`;
    2726        suffix=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'`                     
    28         echo $suffix;
     27        echo $suffix;                   
    2928}
     29
    3030function host_name()
    3131{
     
    3939        echo $HOST_NAME;
    4040}
     41
    4142
    4243#get configs
     
    5758export ISSM_RELEASE="issm"
    5859export OS
     60
    5961
    6062#create ISSM variables
     
    118120then
    119121        cd $ISSM_DIR/src/c
    120         ./intel-compile.sh
     122        ./intel-compile.sh >> ../../c-compilation.log 2>&1
    121123        cd $ISSM_DIR/src/mex
    122         make install
     124        make install >> ../../mex-compilation.log 2>&1
    123125        cd $ISSM_DIR
    124126else
    125         make -j $NUMCPUS
    126         make -j $NUMCPUS install
     127        make -j $NUMCPUS >> ../../cmex-compilation.log 2>&1
     128        make -j $NUMCPUS install >> ../../cmex-compilation.log 2>&1
    127129fi
    128130
     
    130132export ELAPSED_INSTAL=$(timer $START_TIME)
    131133
     134#windows environments: ISSM_DIR_WIN variable not correctly picked up when using
     135#the cron job. just get startup to take the ISSM_DIR variable as the pwd:
     136if [[ "$OS" == "winxp32" ]]
     137then
     138        cat startup.m | sed 's/clear status/clear status; ISSM_DIR=pwd;/g' > startup.m.bak
     139        mv startup.m.bak startup.m
     140fi
     141
     142
    132143#Launch matlab and the nightly run script
    133144cat > matlab_run.m << EOF
    134145startup
    135 warning off
    136146nightlyrun($PACKAGES);
    137147exit
     
    162172From: "ISSM Nightly run" <$EMAIL_ADRESS>
    163173To: $i
    164 Subject: Nightly runs of $ISSM_RELEASE, operating system: $OS.
     174Subject: Nightly runs of $ISSM_RELEASE , operating system: $OS.
    165175Mime-Version: 1.0
    166176Content-Type: text/html
     
    170180From: "ISSM Nightly run" <$EMAIL_ADRESS>
    171181To: $i
    172 Subject: Nightly runs of $ISSM_RELEASE, operating system: $OS.
     182Subject: Nightly runs of $ISSM_RELEASE , operating system: $OS.
    173183Mime-Version: 1.0
    174184Content-Type: text/html
Note: See TracChangeset for help on using the changeset viewer.