#!/bin/bash


OPENGNSYS=${OPENGNSYS:-/opt/opengnsys}
svn export http://opengnsys.es/svn/branches/version2/repo $OPENGNSYS/
mkdir -p $OPENGNSYS/client/bin
wget http://opengnsys.es/downloads/35 -O opengnsys2_bin_utilities.tar.gz
tar xfv opengnsys2_bin_utilities.tar.gz -C $OPENGNSYS/
mkdir -p $OPENGNSYS/client/cache
svn export http://opengnsys.es/svn/branches/version2/engine/2.0 $OPENGNSYS/client/engine
svn export http://opengnsys.es/svn/branches/version2/job_executer $OPENGNSYS/client/job_executer
svn export http://opengnsys.es/svn/branches/version2/ogr/libogr.py $OPENGNSYS/client/lib/python
mkdir -p $OPENGNSYS/client/log
mkdir -p $OPENGNSYS/images
svn export http://opengnsys.es/svn/branches/version2/job_executer $OPENGNSYS/job_executer
mkdir -p $OPENGNSYS/log/clients
mkdir -p $OPENGNSYS/tftpboot/ogclient
wget http://opengnsys.es/downloads/34 -O opengnsys2_ogclient.tar.gz
tar xfv opengnsys2_ogclient.tar.gz -C $OPENGNSYS/tftpboot/ogclient
cp /usr/lib/syslinux/pxelinux.0 $OPENGNSYS/tftpboot/
mkdir -p $OPENGNSYS/tftpboot/syslinux
cp /usr/lib/syslinux/chain.c32 /usr/lib/syslinux/vesamenu.c32 $OPENGNSYS/tftpboot/syslinux
