Changeset 23


Ignore:
Timestamp:
09/28/07 12:27:10 (17 years ago)
Author:
pinsard
Message:

improvement of before and after tasks parametrization

Location:
trunk
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/before.sh

    • Property svn:keywords set to Id
    r22 r23  
    22# 
    33# module : 
    4 # préparation du répertoire d'accueil de bibnemomaf 
    5 # - arborescence; 
    6 # - copie des images; 
    7 # - copie des feuilles de styles; 
    8 # - copie des .ht* (pas testable sur file:++); 
     4# preparation of temporary (before deployement) of superbib results directory 
     5# - tree; 
     6# - copy of constant images copie des images; 
     7# - copy of CSS style sheet; 
    98# - etc. 
    109# 
    11 # original location : 
    12 # /usr/home/fplod/incas/bibnemo/src/bibnemomaf/avant.sh sur aedon.locean-ipsl.upmc.fr 
    13 # 
    1410# update : 
     11# $Id$ 
     12# fplod 2007-09-28T08:43:10Z aedon.locean-ipsl.upmc.fr (Darwin) 
     13# parametrisation and translation 
    1514# fplod 2007-03-30T09:55:49Z aedon.locean-ipsl.upmc.fr (Darwin) 
    1615# création 
    1716# 
    18 # ++ simu paramètre 
    19 produit=bibnemomaf 
    20 lang=en 
    2117# 
    22 DIRSRC=. 
    23 DIRWWW=/tmp/bibopa/ 
     18set -o posix 
     19command=$(basename ${0} .sh) 
     20log_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") 
     21log=/tmp/${command}.${log_date} 
     22# 
     23usage=" Usage : ${command} -p product -s dirsrc -w dirwww -l lang -mono|-multi" 
     24# 
     25minargcount=9 
     26echo " narg ${#}" 
     27if [ ${#} -lt ${minargcount} ] 
     28then 
     29  echo "eee : not enought arguments" 
     30  echo "${usage}" 
     31  exit 1 
     32fi 
     33# 
     34while [ ! -z "${1}" ] 
     35do 
     36 case ${1} in 
     37 -p) # product 
     38  product=${2} 
     39  shift 
     40 ;; 
     41 -s) # dirsrc 
     42  dirsrc=${2} 
     43  shift 
     44 ;; 
     45 -w) # dirwww 
     46  dirwww=${2} 
     47  shift 
     48 ;; 
     49 -l) # lang 
     50  lang=${2} 
     51  shift 
     52 ;; 
     53 -mono ) # monolingual 
     54  monolingual=1 
     55 ;; 
     56 -multi ) # multiingual 
     57  monolingual=0 
     58 ;; 
     59 esac 
     60 shift # next flag 
     61done 
     62# 
     63set -u 
    2464# 
    2565# destruction of previous installation 
    26 /bin/rm -r ${DIRWWW}/ 2> /dev/null 
     66/bin/rm -r ${dirwww}/ 2> /dev/null 
    2767# 
    2868# building of directories 
    29 mkdir -p ${DIRWWW}/images/ 
    30 mkdir -p ${DIRWWW}/php/ 
    31 mkdir -p ${DIRWWW}/${lang}/one/ 
    32 mkdir -p ${DIRWWW}/${lang}/many/${produit}03/ 
    33 mkdir -p ${DIRWWW}/${lang}/many/${produit}04/ 
     69mkdir -p ${dirwww}/images/ 
     70mkdir -p ${dirwww}/php/ 
     71if [ ${monolingual} = 0 ] 
     72then 
     73 mkdir -p ${dirwww}/${lang}/one/ 
     74 mkdir -p ${dirwww}/${lang}/many/${product}03/ 
     75 mkdir -p ${dirwww}/${lang}/many/${product}04/ 
     76else 
     77 mkdir -p ${dirwww}/one/ 
     78 mkdir -p ${dirwww}/many/${product}03/ 
     79 mkdir -p ${dirwww}/many/${product}04/ 
     80fi 
    3481# 
    35 list_php="${DIRSRC}/phpversion.php ${DIRSRC}/server.php ${DIRSRC}/timestamp.php" 
     82list_php="${dirsrc}/phpversion.php ${dirsrc}/server.php ${dirsrc}/timestamp.php" 
    3683for file_php in ${list_php} 
    3784do 
    38  cp ${file_php} ${DIRWWW}/php/ 
     85 cp ${file_php} ${dirwww}/php/ 
    3986done 
    4087# 
    41 mkdir -p ${DIRWWW}/${lang}//images/ # ++ parce que un niveau de plus que d'haibitude dans les chunck 
    42 cp ${DIRSRC}/images/* ${DIRWWW}/images/  
    43 cp ${DIRSRC}/images/* ${DIRWWW}/en/images/ # ++ parce que un niveau de plus que d'habitude dans les chunck 
     88if [ ${monolingual} = 0 ] 
     89then 
     90 mkdir -p ${dirwww}/${lang}//images/ # ++ parce que un niveau de plus que d'haibitude dans les chunck 
     91cp ${dirsrc}/images/* ${dirwww}/images/ 
     92cp ${dirsrc}/images/* ${dirwww}/${lang}/images/ # ++ parce que un niveau de plus que d'habitude dans les chunck 
     93else 
     94 mkdir -p ${dirwww}/images/ # ++ parce que un niveau de plus que d'haibitude dans les chunck 
     95 cp ${dirsrc}/images/* ${dirwww}/images/ 
     96fi 
    4497# 
    4598# copy of CSS 
    46 cp ${DIRSRC}/*.css ${DIRWWW}/ 
    47 cp ${DIRSRC}/*.css ${DIRWWW}/en/ # ++ parce que un niveau de plus que d'haibitude dans les chunck 
     99cp ${dirsrc}/*.css ${dirwww}/ 
     100cp ${dirsrc}/*.css ${dirwww}/${lang}/ # ++ parce que un niveau de plus que d'haibitude dans les chunck 
    48101# 
    49 # modification du temps de création des répetoires pour que le 
    50 # makefile déclenche les générations de html 
    51 find ${DIRWWW}/ -type d -exec touch -t 199912310000 {} \; 
     102# modification of directory time in order to trigger the generation of HTML 
     103# files 
     104find ${dirwww}/ -type d -exec touch -t 199912310000 {} \; 
    52105# 
    53 # fin 
     106# end 
    54107exit 0 
  • trunk/checklink.sh

    r2 r23  
    1515set -o posix 
    1616command=$(basename ${0}) 
    17 #   
     17# 
    1818# ++ simu paramètre 
    1919DIRWWW=/usr/temp/${LOGNAME}/public_html/bibnemomaf/ 
     
    2121checklinkopt="--summary --recursive" 
    2222# 
    23 # is checklink available  
     23# is checklink available 
    2424type checklink 1> /dev/null 2>&1 
    2525checklink_status=${?} 
  • trunk/install.sh

    • Property svn:keywords set to Id
    r14 r23  
    22# 
    33# module : 
    4 # installation des pages bibnemomaf dans DIRFINAL* donné en argument 
    5 # à partir des fichiers produits ou copiés ou liés sous DIRWWW  
    6 # donné en argument 
     4# publication (rsync) of dirwww content on dirpublish given in argument 
    75# 
    8 # nb : !!! attention utilisation du compte fplod@aedon.lodyc.jussieu.fr 
    9 # 
    10 # source : 
    11 # /usr/home/fplod/incas/bibnemo/src/bibnemomaf/install.sh sur aedon.locean-ipsl.upmc.fr 
     6# If the host of publication is cerbere.locean-ipsl.upmc.fr, update_web is 
     7# launched. 
    128# 
    139# update 
     10# $Id$ 
     11# fplod 2007-09-28T09:30:43Z aedon.locean-ipsl.upmc.fr (Darwin) 
     12# parametrisation and translation 
    1413# smasson 2007-06-07T16:43:42Z arete.locean-ipsl.upmc.fr (Darwin) 
    1514# can give the answer with input parameters 
    1615# fplod 2007-04-26T11:51:42Z aedon.locean-ipsl.upmc.fr (Darwin) 
    1716# 
    18 # ++ simu paramètre 
    19 DIRFINALLOCEAN=smasson@arete.locean-ipsl.upmc.fr:Sites/bibnemomaf/ 
    20 DIRWWW=/tmp/bibopa/ 
     17set -o posix 
     18command=$(basename ${0} .sh) 
     19log_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") 
     20log=/tmp/${command}.${log_date} 
     21# 
     22usage=" Usage : ${command} -w dirwww -p dirpublish" 
     23# 
     24minargcount=4 
     25echo " narg ${#}" 
     26if [ ${#} -lt ${minargcount} ] 
     27then 
     28  echo "eee : not enought arguments" 
     29  echo "${usage}" 
     30  exit 1 
     31fi 
     32# 
     33while [ ! -z "${1}" ] 
     34do 
     35 case ${1} in 
     36 -w) 
     37  dirwww=${2} 
     38  shift 
     39 ;; 
     40 -p) 
     41  dirpublish=${2} 
     42  shift 
     43 ;; 
     44 esac 
     45 shift # next flag 
     46done 
     47# 
     48set -u 
     49# 
     50# ++ check directories 
    2151# 
    2252answer=${1:-" "} 
     
    2555        ;; 
    2656    *) 
    27         echo "Do you want to install on ${DIRFINALLOCEAN}  (y|[n]) ?" 
    28         read answer    
     57        echo "Do you want to install on ${dirpublish}  (y|[n]) ?" 
     58        read answer 
    2959        ;; 
    3060esac 
    3161case ${answer} in 
    3262 y|Y) 
    33  # copy of ${DIRWWW} on $DIRFINALLOCEAN 
    34  echo "iii : update of ${DIRFINALLOCEAN}" 
    35  rsync -av -e ssh ${DIRWWW}/ ${DIRFINALLOCEAN} 
    36  # pas sur aedon ssh fplod@cerbere.lodyc.jussieu.fr /usr/local_linux/bin/update_web 
     63 # copy of ${dirwww} on $dirpublish 
     64 echo "iii : update of ${dirpublish}" 
     65 rsync -av -e ssh ${dirwww}/ ${dirpublish} 
     66 # detect if in dirpublish following this pattern [USER@]HOST:SRC, HOST 
     67 # is cerbere.locean-ipsl.upmc.fr. If so, update_web is launched 
     68 userhost=${dirpublish%%:*} 
     69 host=${userhost##*@} 
     70 if [ "${host}" = "cerbere.locean-ipsl.upmc.fr" ] 
     71 then 
     72  ssh ${userhost} /usr/local_linux/bin/update_web 
     73 fi 
    3774 ;; 
    3875 *) 
    39  echo "no update of ${DIRFINALLOCEAN}" 
    40  ;; 
    41 esac 
    42 # 
    43 # ++ simu paramètre 
    44 DIRFINALLOCEAN=opatlod@cerbere.locean-ipsl.upmc.fr:NEMO/general/biblio_new/ 
    45 # 
    46 answer=${2:-" "} 
    47 case ${answer} in 
    48     y|Y|n|N) 
    49         ;; 
    50     *) 
    51         echo "Do you want to install on ${DIRFINALLOCEAN}  (y|[n]) ?" 
    52         read answer    
    53         ;; 
    54 esac 
    55 case ${answer} in 
    56  y|Y) 
    57  # copy of ${DIRWWW} on $DIRFINALLOCEAN 
    58  echo "iii : update of ${DIRFINALLOCEAN}" 
    59  rsync -av -e ssh ${DIRWWW}/ ${DIRFINALLOCEAN} 
    60  ssh opatlod@cerbere.lodyc.jussieu.fr /usr/local_linux/bin/update_web 
    61  ;; 
    62  *) 
    63  echo "no update of ${DIRFINALLOCEAN}" 
     76 echo "no update of ${dirpublish}" 
    6477 ;; 
    6578esac 
  • trunk/mailtousernemo.sh

    r4 r23  
    312312# 
    313313# ++ parce que je ne sais pas dire où est la dtd dans la commande xmllint 
    314 cp usernemo.dtd /tmp/  
     314cp usernemo.dtd /tmp/ 
    315315xmllint --noout --valid ${xmloutputfull} 1>> ${log} 2>> ${log} 
    316316status=${?} 
  • trunk/makefile

    r21 r23  
    99# ++ les dépendences ne marchent pas bien 
    1010# ++ la génération de pdf ne marchent pas bien sans doute à cause des images top 
     11# fplod 2007-09-28T08:56:17Z aedon.locean-ipsl.upmc.fr (Darwin) 
     12# add before and install targets 
    1113# fplod 2007-06-06T10:23:19Z aedon.locean-ipsl.upmc.fr (Darwin) 
    1214# change hard coded DIRBASE 
     
    4042/tmp/bibopa/ 
    4143 
     44# here are some examples of DIRPUBLISH, the first on for Seb on his Mac, 
     45# the second one for me (Françoise) on mine 
     46# the third for me (Françoise) on my home page http://www.locean-ipsl.upmc.fr/~fplod/superbibdemo/ 
     47# 
     48# the real one for NEMO is opatlod@cerbere.locean-ispl.upmc.fr:NEMO/general/biblio_new/ 
     49# 
     50# comment all of them and define your own 
     51# 
     52#DIRPUBLISH = \ 
     53#smasson@arete.locean-ipsl.upmc.fr:Sites/bibnemomaf/ 
     54 
     55#DIRPUBLISH = \ 
     56#fplod@aedon.locean-ipsl.upmc.fr:Sites/superbibdemo/ 
     57 
     58DIRPUBLISH = \ 
     59fplod@cerbere.locean-ipsl.upmc.fr:./WWW/superbibdemo/ 
     60 
    4261MAKEDATE = \ 
    4362`date -u +"%Y-%m-%dT%H:%M:%SZ"` 
     
    7493 
    7594help : 
     95        @echo "Define in the makefile localisations of :" 
     96        @echo " - sources (DIRSRC) where you \"svn checkout\" superbib" 
     97        @echo " - temporary Web pages (DIRWWW), where you can check links before publication" 
     98        @echo "- published Web pages (DIRPUBLISH)" 
     99        @echo "" 
    76100        @echo "Prepare output directories :" 
    77         @echo "$ ./avant.sh" 
     101        @echo "$ make before" 
     102        @echo "" 
    78103        @echo "identify bibliography databank; for example :" 
    79104        @echo "$ ln -sf data/biball.xml bibrefnemo.xml" 
    80105        @echo "check for duplicate DOI; for example :" 
    81106        @echo "$ ./twindoi.sh -i bibrefnemo.xml -t xml" 
     107        @echo "" 
    82108        @echo "identify usernemo databank; for example :" 
    83109        @echo "$ ln -sf data/usernemo.xml usernemo.xml" 
    84110        @echo "$ ln -sf data/usernemo.dtd usernemo.dtd" 
     111        @echo "" 
    85112        @echo "Following commands are available to build outputs :" 
    86113        @echo "$ make html_en" 
    87114        @echo "$ make pdf_en" 
    88115        @echo "Last step = installation" 
    89         @echo "$ ./install.sh" 
     116        @echo "$ make install" 
    90117        @echo " " 
    91118        @echo "if you move this product to an other place, " 
    92         @echo "change DIRWWW,DIRBASE,DIRTMP in makefile" 
    93         @echo "change DIRSRC,DIRWWW in ./avant.sh" 
    94         @echo "change DIRFINALLOCEAN,DIRWWW in ./install.sh" 
     119        @echo "change parameters in the call sequence of ./before.sh and ./install.sh" 
     120        @echo "and in the call sequence of in ./install.sh" 
     121        @echo "in this makefile" 
     122 
     123before : 
     124        ./before.sh -p $(PRODUIT) -s $(DIRSRC) -w $(DIRWWW) -multi -l en   
     125 
     126install : 
     127        ./install.sh -w $(DIRWWW) -p $(DIRPUBLISH) 
    95128 
    96129clean : 
     
    131164$(DIRWWW)/en/one/$(PRODUIT2).html 
    132165 
    133 pdf_en : \ 
     166pdf_en : ./\ 
    134167$(DIRTMP)/$(PRODUIT)01.pdf \ 
    135168$(DIRTMP)/$(PRODUIT)02.pdf 
  • trunk/twindoi.sh

    r20 r23  
    1515# (xml vs txt) did not give any alert and check inside 
    1616# xml comments 
    17 # $ ./twindoi.sh -i data/biball.xml -t raw  
     17# $ ./twindoi.sh -i data/biball.xml -t raw 
    1818# $Id$ 
    1919# smasson 2007-06-20T16:11:47Z 
     
    3333do 
    3434 case ${1} in 
    35  -i) # filein  
     35 -i) # filein 
    3636  filein=${2} 
    3737  shift 
    3838 ;; 
    39  -t) # type  
     39 -t) # type 
    4040  type=${2} 
    4141  shift 
     
    5050set -u 
    5151# 
    52 # check for filein  
     52# check for filein 
    5353if [ ! -f ${filein} ] 
    5454then 
     
    6464 filexml=${filein} 
    6565;; 
    66 *)  
     66*) 
    6767   echo "eee : type should be raw or xml" 
    6868   exit 1 
     
    9595if [ ${nl} -eq 0 ] 
    9696then 
    97    echo "www : no DOI found in ${filein}"  
     97   echo "www : no DOI found in ${filein}" 
    9898   rm /tmp/doilist.txt 2> /dev/null 
    9999   exit 1 
    100 fi  
     100fi 
    101101n=1 
    102102while [ ${n} -lt ${nl} ] 
Note: See TracChangeset for help on using the changeset viewer.