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

Annotation of /mitgcm.org/scripts/process_emails

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


Revision 1.5 - (hide annotations) (download)
Wed Mar 5 00:56:11 2008 UTC (16 years ago) by jmc
Branch: MAIN
Changes since 1.4: +20 -2 lines
keep log files in dedicated dir (instead of filling my mail box)

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

  ViewVC Help
Powered by ViewVC 1.1.22