
#####################################################################
# Choix eventuel de la version : branche ou trunk et svn particuliere
#####################################################################

branche=IPSLCM6.0.15
+ branche=IPSLCM6.0.15
branche=trunk
+ branche=trunk
rev="-r 4084"
+ rev='-r 4084'
rev=""
+ rev=
latest=""
+ latest=
#latest=20210512 # Pour imposer de tester la convergence avec une version passee

TMP_D=/tmp/lmdz ; mkdir -p $TMP_D
+ TMP_D=/tmp/lmdz
+ mkdir -p /tmp/lmdz

if [ $branche != trunk ] ; then
    echo cas non prevu
#     exit
fi
+ '[' trunk '!=' trunk ']'

check=0
+ check=0
check=1 # On verifie un certain nombre de choses.
+ check=1
force=0
+ force=0

optionnel=" -cpp ORCHIDEE_NOZ0H "
+ optionnel=' -cpp ORCHIDEE_NOZ0H '

local=`pwd`
++ pwd
+ local=/u/lmdz/WWW/Distrib
while (($# > 0)) ; do
  case $1 in
      "-h") cat <<fin
USAGE creation_modipsl.sh
Crée les archives du modele pour installation par install.sh
-force : pour créeer une seconde version le meme jour
fin
        exit ;;
      "-force") force=1 ; shift ;;
      "-r") rev="-r $2" ; shift ; shift ;;
      "-b") branche="$2" ; shift ; shift ;;
      "-latest") latest=$2 ; shift ; shift ;;
      *) echo option non prevue ; ./creation_modipsl.sh -h ; exit
  esac
done
+ (( 0 > 0 ))

# machine_cible=erskine.lmd.jussieu.fr
#machine_cible=carey
machine_cible=lmdz-cq
+ machine_cible=lmdz-cq
if [ "`hostname`" != "$machine_cible" ] ; then echo Lancer sur $machine_cible ; exit ; fi
++ hostname
+ '[' lmdz-cq '!=' lmdz-cq ']'
set -ex
+ set -ex

###########################################################################
# localisation svn
###########################################################################
# cvs -d :pserver:lmdzbrowse@cvs.lmd.jussieu.fr:/home/cvsroot checkout LMDZ5 
LMDZv=LMDZ6
+ LMDZv=LMDZ6
if [ $LMDZv = LMDZ6 ] ; then
   LMDZ=LMDZ
else
   LMDZ=LMDZ5
fi
+ '[' LMDZ6 = LMDZ6 ']'
+ LMDZ=LMDZ

if [ $branche == trunk ] ; then
   branchepath=trunk
else
   branchepath=branches/$branche
fi
+ '[' trunk == trunk ']'
+ branchepath=trunk
svnmodel=http://svn.lmd.jussieu.fr/LMDZ/$LMDZv/$branchepath
+ svnmodel=http://svn.lmd.jussieu.fr/LMDZ/LMDZ6/trunk


##########################################################################
# Recuperation des infos svn pour le choix du nom du modele
##########################################################################
echo svn info $rev $svnmodel :
+ echo svn info http://svn.lmd.jussieu.fr/LMDZ/LMDZ6/trunk :
svn info http://svn.lmd.jussieu.fr/LMDZ/LMDZ6/trunk :
svn info $rev $svnmodel
+ svn info http://svn.lmd.jussieu.fr/LMDZ/LMDZ6/trunk
svn: E170013: Unable to connect to a repository at URL 'http://svn.lmd.jussieu.fr/LMDZ/LMDZ6/trunk'
svn: E175009: The XML response contains invalid XML
svn: E130003: XML malformé: no element found à la ligne 1
