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

Last change on this file since 408 was 345, checked in by pinsard, 16 years ago

migration from DocBook? 4 to Docbook 5 : sources and production tools

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