#!/bin/sh
ACCION=`echo $4|awk -F'-' '{print $1}'`
ACCIONINFO=`echo $4|awk -F'-' '{print $2}'`
EACCION=`echo $ACCIONINFO|awk -F'_' '{print $1}'`
E2ACCION=`echo $ACCIONINFO|awk -F'_' '{print $2}'`
echo Accion: $ACCION, Opciones: $ACCIONINFO E1: $EACCION E2: $E2ACCION


MAKE=$4
PACKS=$3
DIR=$2
URL=$1


PACKLET=`echo $0 | sed 's/\/svn.sh$//'`

echo en $PACKS/$DIR.svn hace $MAKE sobre SVN $1 $2 
mkdir -p $PACKS
DIRACT=`pwd`
if test ! -e $PACKS/$DIR.svn; then
  svn co $URL $PACKS/$DIR.svn
  cd $PACKS/$DIR.svn
else 
  cd $PACKS/$DIR.svn
  svn up 

fi

if test "x$PACKLET" = "x`echo $PACKLET | sed 's/^\///'`" ; then
  echo PR  /bin/sh $DIRACT/$PACKLET/comain.sh $MAKE
  /bin/sh $DIRACT/$PACKLET/comain.sh $MAKE
else
  echo PA /bin/sh $PACKLET/comain.sh $MAKE
  /bin/sh $PACKLET/comain.sh $MAKE
fi
cd $DIRACT





