source: trunk/SRC/Documentation/xmldoc/getsaxo_pre.sh @ 413

Last change on this file since 413 was 410, checked in by pinsard, 15 years ago

no more titlepage usage for XML processing

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1#! /bin/sh
2#
3# module :
4# ++ working on getsaxo.xml before processing for HTML and wiki
5#
6# TODO
7# ====
8#
9# file in/out parameters to be usable correctly in makefile
10#
11# update :
12# $Id$
13#
14# fplod 2008-04-15T10:53:26Z aedon.locean-ipsl.upmc.fr (Darwin)
15# creation from makehtml.sh
16# adapation to docbook 5.0
17#
18set -u
19set -o posix
20#
21case $( whoami ) in
22    smasson)
23        lgforge=smasson
24    ;;
25    floseb)
26        lgforge=smasson
27    ;;
28    *)
29        lgforge=saxo
30    ;;
31esac
32#
33# size of SRC and DATA with .svn
34szallsvn=$( du -sh ../../.. | awk '{print $1}' )
35szallsvn=${szallsvn%*M}
36# size of SRC with .svn
37szsrcsvn=$( du -sh ../../../SRC | awk '{print $1}' )
38szsrcsvn=${szsrcsvn%*M}
39# size of DATA with .svn
40szdatasvn=$( du -sh ../../../DATA | awk '{print $1}' )
41szdatasvn=${szdatasvn%*M}
42#
43echo "iii : you will be asked ${lgforge}@forge.ipsl.jussieu.fr passwd two times"
44#
45# find the most recent SAXO_SRC_yyyymmddrxxx.tar.gz in
46# /ipsl/forge/projets/saxo/download/
47infosrc=$(ssh ${lgforge}@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_SRC_*.tar.gz  | head -n 1)
48filesrc=$(echo ${infosrc} | awk '{print $NF}')
49szsrc=$(echo ${infosrc} | awk '{print $5}')
50#
51# ndate is the date in the file SAXO_SRC_*.tar.gz
52ndate=${filesrc##*_}
53ndate=${ndate%.tar.gz}
54#
55# find the most recent SAXO_DATA_yyyymmddrxxx.tar.gz in
56# /ipsl/forge/projets/saxo/download/
57infodata=$(ssh ${lgforge}@forge.ipsl.jussieu.fr ls -lht /ipsl/forge/projets/saxo/download/SAXO_DATA_*.tar.gz | head -n 1)
58filedata=$(echo ${infodata} | awk '{print $NF}')
59szdata=$(echo ${infodata} | awk '{print $5}')
60#
61# ndate2 is the date in the file SAXO_DATA_*.tar.gz
62ndate2=${filedata##*_}
63ndate2=${ndate2%.tar.gz}
64#
65sed -e s/"\&date\;"/${ndate}/g \
66    -e s/"\&date2\;"/${ndate2}/g \
67    -e s/"\&szsrc\;"/${szsrc}/g \
68    -e s/"\&szdata\;"/${szdata}/g \
69    -e s/"\&szallsvn\;"/${szallsvn}/g \
70    -e s/"\&szsrcsvn\;"/${szsrcsvn}/g \
71    -e s/"\&szdatasvn\;"/${szdatasvn}/g \
72    getsaxo.xml > getsaxo_sed.xml
73#
74# exit
75exit 0
Note: See TracBrowser for help on using the repository browser.