/[MITgcm]/mitgcm.org/scripts/prc_tr_emails
ViewVC logotype

Annotation of /mitgcm.org/scripts/prc_tr_emails

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (hide annotations) (download)
Fri Jan 12 15:51:57 2018 UTC (7 years ago) by jmc
Branch: MAIN
Changes since 1.4: +2 -2 lines
add commented lines

1 jmc 1.1 #! /usr/bin/env bash
2    
3 jmc 1.5 # $Header: /u/gcmpack/mitgcm.org/scripts/prc_tr_emails,v 1.4 2018/01/11 21:59:04 jmc Exp $
4 jmc 1.1
5     #cat <<EOF
6     #==========================================================
7     #Parsing MITgcm testing emails :
8     #==========================================================
9     #
10     #EOF
11    
12     #-- build munpack if needed:
13 jmc 1.4 unpck=$HOME/testing/tools_mpack/munpack
14 jmc 1.1 if test ! -x $unpck ; then
15     MPACKDIR=`dirname $unpck`
16     cd $MPACKDIR
17     ./configure && make
18     fi
19 jmc 1.4 unpck=$HOME/testing/munpack.$HOSTTYPE
20     #ls -l $unpck
21 jmc 1.1
22     #-- create a daily log file (if not already there)
23 jmc 1.4 cd $HOME/testing/logs
24 jmc 1.1 logpfx="prc_emails_" ; sfx=`date +%m%d`
25     logfile="../logs/${logpfx}$sfx"
26     if test -e $logfile ; then :
27     else
28     #-- clean-up old log files:
29     echo -n '-- in dir: ' ; pwd
30     n=$(( `ls ${logpfx}* | wc -l` - 10 ))
31     if test $n -gt 0 ; then
32     echo -n ' remove files: '
33     ls -lt ${logpfx}* | tail -"$n"
34     ls -t ${logpfx}* | tail -"$n" | xargs rm -f
35     fi
36     echo ' create new log file:' $logfile
37     touch $logfile
38 jmc 1.3 echo "Log file created from '"`hostname`"' by '$USER' on:" `date` >> $logfile
39 jmc 1.1 fi
40    
41 jmc 1.2 #-- get and parse emails :
42 jmc 1.4 cd $HOME/testing/front_content && ./get+parse_msg -u $unpck -a jmc@ocean.mit.edu >> $logfile 2>&1
43 jmc 1.5 #cd $HOME/testing/temp && ./get+parse_msg -u $unpck -a jmc@ocean.mit.edu >> $logfile 2>&1

  ViewVC Help
Powered by ViewVC 1.1.22