Index: /issm/oecreview/Template/Makefile
===================================================================
--- /issm/oecreview/Template/Makefile	(revision 10968)
+++ /issm/oecreview/Template/Makefile	(revision 10968)
@@ -0,0 +1,11 @@
+name=docreview
+
+
+all: 
+	latex $(name).tex
+	dvips $(name).dvi
+	ps2pdf $(name).ps  $(name).pdf
+	rm -rf *.dvi *.log *.aux *.ps
+
+clean:
+	rm -rf *.dvi *.log *.aux
Index: /issm/oecreview/Template/docreview.tex
===================================================================
--- /issm/oecreview/Template/docreview.tex	(revision 10968)
+++ /issm/oecreview/Template/docreview.tex	(revision 10968)
@@ -0,0 +1,67 @@
+\documentclass[]{report}   % list options between brackets
+\usepackage{graphicx}              % list packages between braces
+
+% type user-defined commands here
+
+\begin{document}
+
+\title{JPL EXPORT ADMINISTRATION \\ DOCUMENT REVIEW RECORD}   % type title between braces
+\author{Tom Scavo}         % type author(s) between braces
+\date{October 27, 1995}    % type date between braces
+%\maketitle
+
+
+\begin{center}
+\begin{tabular}{ |c|c| }
+\hline
+JPL EXPORT ADMINISTRATION \\
+\textit{ DOCUMENT REVIEW RECORD} \\
+\hline
+\end{tabular}
+\end{center}
+
+\hfill Log \#: \underline{\input{LogNumber}}
+
+\vspace{1cm}
+\noindent (Note: This form and process do not replace the procedures described in JPL Policy relating to review and approval of proposals and contractual 
+documents. This process is intended to document the review and coordination of requests to ascertain the export control ramifications relating to specific 
+documents. Export Administration signature does not convey authority to export or release the "Exporter of Record" from any export laws or regulations.)\\
+
+\noindent \textbf{Program:} \underline{ISSM: Ice Sheet System Model} \\ \\
+\noindent \textbf{Person Requesting or Initiating Export}: \underline{Dr. Eric Larour}\\ \\
+\noindent \textbf{Date Received}: \underline{\input{Date}}\\ \\
+\noindent \textbf{Document Title/Description}: ISSM changes from revision \input{r1} to revision \input{r2} \\ \\
+\noindent \textbf{Release to:} \underline{http://issm.ess.uci.edu/svn/issm/issm/trunk on ISSM svn repository}\\ \\
+\noindent \textbf{JPL Intranet:} \underline{murdo.jpl.nasa.gov/proj/ice/larour/issm-uci/trunk-jpl}\\ \\
+
+\noindent \textbf{Disposition: 6 } 
+Does not contain export-controlled information. May be released/disclosed as requested subject to 
+Company guidelines on protection of proprietary information (if applicable). \\
+
+\noindent \textbf{Comments:}  see table of changes below. \\ \\
+\noindent \textbf{Reviewed by ISSM Export Transfer Liaison:} Dr. Eric Larour \hfill \textbf{Date:} \input{Date} \\ 
+\includegraphics[scale=1]{signature.eps}
+
+\noindent JPL Export Administration Form TBS – June 29, 2011
+
+\begin{center}
+\line(1,0){250}
+\end{center}
+
+\noindent \textbf{Disposition:} \\
+1:	  Public Domain Information (Ref ITAR Section 120.11) \\
+2:	  Qualifies for ITAR Exemption				 \\
+3:	  Covered by Department of State License/Agreement Number					  \\
+4:	  Covered by Department of Commerce validated license or exception				 \\
+5:	  New License Required \\
+6:	  Does not contain export-controlled information.  May be released/disclosed as requested subject
+   to Company guidelines on protection of proprietary information (if applicable). \\
+7:	 Other (specify)   
+\begin{center}
+\line(1,0){250}
+\end{center}
+
+
+\input{log}
+
+\end{document}
Index: /issm/oecreview/oecreview.sh
===================================================================
--- /issm/oecreview/oecreview.sh	(revision 10968)
+++ /issm/oecreview/oecreview.sh	(revision 10968)
@@ -0,0 +1,230 @@
+#/bin/bash
+#Generate a document record for a range of files in the ISSM svn directory (trunk). 
+
+#Some functions
+function parselog() #{{{1
+{
+cat $1 | while read line
+do
+	if [ "$line" ==  "" ]
+	then
+		#empty line, keep going
+		continue
+	fi
+	if [ "$line" ==  "------------------------------------------------------------------------" ] 
+	then
+		#print previous log if not empty
+		if [ "$RELEASE" != "" ]
+		then
+			echo "$RELEASE $USER  $DATE $TIME"
+		fi
+
+		#new log coming up!
+		NEWLOG=1
+		LOG=""
+		continue
+	fi
+
+	if [ "$NEWLOG" == "1" ] 
+	then
+		
+		#r2714 | morlighe | 2009-12-09 11:48:20 -0800 (Wed, 09 Dec 2009) | 1 line
+		RELEASE=$(echo $line | awk '{print $1}')
+		USER=$(   echo $line | awk '{print $3}')
+		DATE=$(   echo $line | awk '{print $5}')
+		TIME=$(   echo $line | awk '{print $6}')
+
+		NEWLOG=0
+		continue
+	else
+		LOG=$(echo "$LOG $line")
+	fi
+done
+} #}}}
+function parselogchangedpaths() #{{{1
+{
+cat $1 | while read line
+do
+	if [ "$line" ==  "" ]
+	then
+		svnlog=1
+		continue
+		#empty line, we are done!
+	fi
+	if [ "$line" ==  "------------------------------------------------------------------------" ] 
+	then
+		#print previous log if not empty
+		if [ "$RELEASE" != "" ]
+		then
+			echo $LOG
+		fi
+
+		#new log coming up!
+		NEWLOG=1
+		LOG=""
+		continue
+	fi
+
+	if [ "$NEWLOG" == "1" ] 
+	then
+		
+		#r2714 | morlighe | 2009-12-09 11:48:20 -0800 (Wed, 09 Dec 2009) | 1 line
+		RELEASE=$(echo $line | awk '{print $1}')
+		USER=$(   echo $line | awk '{print $3}')
+		DATE=$(   echo $line | awk '{print $5}')
+		TIME=$(   echo $line | awk '{print $6}')
+
+		NEWLOG=0
+		continue
+	else
+		if [ "$svnlog" == "1" ] 
+		then
+			continue
+		else
+			line=`echo $line | grep -v "Changed paths:"`
+			LOG=$(echo "$LOG $line")
+		fi
+	fi
+done
+} #}}}
+function parselogmessages() #{{{1
+{
+cat $1 | while read line
+do
+	if [ "$line" ==  "" ]
+	then
+		svnlog=1
+		continue
+		#empty line, we are done!
+	fi
+	if [ "$line" ==  "------------------------------------------------------------------------" ] 
+	then
+		#print previous log if not empty
+		if [ "$RELEASE" != "" ]
+		then
+			echo $LOG
+		fi
+
+		#new log coming up!
+		NEWLOG=1
+		LOG=""
+		continue
+	fi
+
+	if [ "$NEWLOG" == "1" ] 
+	then
+		
+		#r2714 | morlighe | 2009-12-09 11:48:20 -0800 (Wed, 09 Dec 2009) | 1 line
+		RELEASE=$(echo $line | awk '{print $1}')
+		USER=$(   echo $line | awk '{print $3}')
+		DATE=$(   echo $line | awk '{print $5}')
+		TIME=$(   echo $line | awk '{print $6}')
+
+		NEWLOG=0
+		continue
+	else
+		if [ "$svnlog" == "1" ] 
+		then
+			line=`echo $line | grep -v "Changed paths:"`
+			LOG=$(echo "$LOG $line")
+		else
+			continue
+		fi
+	fi
+done
+} #}}}
+function todaydate() #{{{1
+{
+	suffix=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'`			 
+	echo $suffix;			 
+} #}}}
+
+#Only keep pdf file generated? 
+keeppdf=1;
+
+#today's date
+TODAY=$(todaydate);
+
+#Archive location: 
+archiveroot=$ISSM_DIR_UCI/oecreview/Archive
+templatedir=$ISSM_DIR_UCI/oecreview/Template
+trunk=$ISSM_DIR_UCI/trunk-jpl
+
+#Range 
+if test $# -ne 2
+then
+echo "oecreview.sh needs 2 arguments specifying the svn range on which to apply the review" 
+exit 1
+fi
+
+r1=$1;
+r2=$2;
+
+#Name of archive  directory: 
+archivedir="$archiveroot/$r1-$r2"
+
+#Create archive subdirectory for this batch of changes
+rm -rf  $archivedir &&  mkdir $archivedir
+
+#start log template
+cat > $archivedir/log.tex << EOF
+EOF
+
+#create log number
+echo "$r1-$r2"  > $archivedir/LogNumber.tex
+
+#create date tex
+echo $TODAY  > $archivedir/Date.tex
+
+#create revision texs
+echo $r1 > $archivedir/r1.tex
+echo $r2 > $archivedir/r2.tex
+
+#copy template
+cp  $templatedir/docreview.tex $archivedir/ISSM-DocReview-$r1-$r2.tex
+cp  $templatedir/signature.eps $archivedir/
+cat $templatedir/Makefile  | sed "s/name=docreview/name=ISSM-DocReview-$r1-$r2/g" > $archivedir/Makefile
+
+counter=0
+for (( i=$r1; i<$r2; i++ ))
+do
+	j=$(($i+1));
+
+	#get svn log for this commit
+	log=`svn log  -v -r $i:$j  $trunk | parselog`
+
+	#retrieve info from the log
+	release=`echo $log | awk '{printf("%s\n",$1);}'`
+	user=`echo $log | awk '{printf("%s\n",$2);}'`
+	date=`echo $log | awk '{printf("%s\n",$3);}'`
+	time=`echo $log | awk '{printf("%s\n",$4);}'`
+
+	if test -z $user 
+	then 
+		#empty user, nothing was changed on the trunk/, skip
+		continue 
+	fi
+	
+	counter=$(($counter+1))
+
+	#retrieve files affected
+	changedpath=`svn log  -v -r $i:$j  $trunk | parselogchangedpaths `
+	logmessage=`svn log  -v -r $i:$j  $trunk | parselogmessages `
+
+	#create diff file
+	svn diff  -r $i:$j  $trunk > $archivedir/ISSM-$i-$j.diff
+	
+	#add lines to explain the logs
+	cat $archivedir/log.tex && echo "\\noindent \\textbf{Change \#$counter} with diff file ISSM-$i-$j.diff: \\\\ Function name: \\\\$changedpath \\\\ Export determination: 6. \\\\Rationale: $logmessage \\\\\\\\" >> $archivedir/log.tex 
+done
+
+#create pdf file
+cd $archivedir
+make
+
+#copy pdf file in Archive directory:  
+cp $archivedir/ISSM-DocReview-$r1-$r2.pdf $archiveroot
+
+#conclude
+cd $archivedir
+
