#!/bin/sh # # history # Sept 2006: Sebastien Masson (smasson\@lodyc.jussieu.fr) # # version # $Id$ # homeidl=$1 homesaxo=$2 homesrc=$3 version=$4 # ############################################################# # create the file saxoidl.adp from idl.adp and idldoc-lib.adp ############################################################# # create saxoidl.adp header [ ! -f ${homeidl}/idl.adp ] && exit 1 [ ! -f ${homesaxo}/idldoc-lib.adp ] && exit 1 # cat < ${homesrc}/idl.adp SAXO - IDL ${version} Help SAXO - IDL ${version} Help ${homesrc}/home.html About SAXO ${homesrc}/aboutsaxo.txt ${homeidl} EOF [ $? -ne 0 ] && exit 1 # extract part from to # put the complete path of the references # and put it at the end of idl.adp sed -e '1,/<\/profile>/ d' \ -e '/<\/assistantconfig>/,$ d' \ -e "s?ref=\"?ref=\"${homeidl}/?g" \ ${homeidl}/idl.adp >> ${homesrc}/idl.adp [ $? -ne 0 ] && exit 1 # extract part from # put the complete path of the references # and put it at the end of idl.adp sed -e '1,/<\/profile>/ d' \ -e "s?ref=\"?ref=\"${homesaxo}/?g" \ ${homesaxo}/idldoc-lib.adp >> ${homesrc}/idl.adp [ $? -ne 0 ] && exit 1 ############################################################# # create the file home.html from the one installed with IDL ############################################################# [ ! -f ${homeidl}/home.html ] && exit 1 # put the complete path of the references sed -e "s?ref=\"?ref=\"${homeidl}/?g" \ ${homeidl}/home.html > ${homesrc}/home.html [ $? -ne 0 ] && exit 1 # number of the line containing the first grep -n '' ${homesrc}/home.html > /tmp/toto$$ [ $? -ne 0 ] && exit 1 numline=$( head -n 1 /tmp/toto$$ ) [ $? -ne 0 ] && exit 1 numline=$( echo ${numline} | cut -b1-2 ) [ $? -ne 0 ] && exit 1 # define the part to be added after the first cat << EOF > /tmp/toto$$

  SAXO Directory

EOF [ $? -ne 0 ] && exit 1 # add line for SAXO Directory after the first sed -e "${numline}r /tmp/toto$$" ${homesrc}/home.html > /tmp/toto2$$ [ $? -ne 0 ] && exit 1 mv -f /tmp/toto2$$ ${homesrc}/home.html [ $? -ne 0 ] && exit 1 # number of the line containing the last grep -n '' ${homesrc}/home.html > /tmp/toto$$ [ $? -ne 0 ] && exit 1 numline=$( tail -n 1 /tmp/toto$$ ) [ $? -ne 0 ] && exit 1 numline=$( echo ${numline} | cut -b1-2 ) [ $? -ne 0 ] && exit 1 # define the part to be added after the last cat << EOF > /tmp/toto$$

  SAXO Home Page

EOF [ $? -ne 0 ] && exit 1 # add line for SAXO Home Page after the last sed -e "${numline}r /tmp/toto$$" ${homesrc}/home.html > /tmp/toto2$$ [ $? -ne 0 ] && exit 1 mv -f /tmp/toto2$$ ${homesrc}/home.html [ $? -ne 0 ] && exit 1 # put the complete path of the images except for SAXOIDL_OnlineHelp_title.png sed -e "s?src=\"?src=\"${homeidl}/?g" \ -e "s?src=\".*IDL_OnlineHelp_Title\.gif\"?src=\"${homesaxo}/../xmldoc/images/SAXOIDL_OnlineHelp_title\.png\"?g" \ ${homesrc}/home.html > /tmp/toto$$ [ $? -ne 0 ] && exit 1 mv -f /tmp/toto$$ ${homesrc}/home.html [ $? -ne 0 ] && exit 1 ############################################################# # create the file aboutsaxo.txt from overview ############################################################# [ ! -f ${homeidl}/home.html ] && exit 1 # remove the line with @ in the file overview sed -e '/@/d' ${homesaxo}/../../overview > ${homesrc}/aboutsaxo.txt [ $? -ne 0 ] && exit 1 # add a link to saxo page cat <> ${homesrc}/aboutsaxo.txt More informations on http://forge.ipsl.jussieu.fr/saxo EOF [ $? -ne 0 ] && exit 1 exit 0