#!/bin/bash

if [ $(hostname) = "ps.hpc.uio.no" ]; then

  NLPLROOT=/projects/nlpl;

  #
  # first things first: make sure we are running current scripts
  #
  cd ${NLPLROOT}/operation/mirror;
  svn up;

fi


if [ $(hostname) = "taito-login3.csc.fi" ]; then

  NLPLROOT=/proj/nlpl;

  #
  # first things first: make sure we are running current scripts
  #
  cd ${NLPLROOT}/operation;
  svn up;

fi


if [ -d /cluster/shared/nlpl ]; then

  NLPLROOT=/cluster/shared/nlpl;

  #
  # first things first: make sure we are running current scripts
  #
  cd ${NLPLROOT}/operation;
  svn up;

  #
  # replicate the vectors repository to Oslo and Finland
  #
  ${NLPLROOT}/operation/mirror/data/vectors/uio;
  ${NLPLROOT}/operation/mirror/data/vectors/puhti;

  #
  # and do the same, more or less, for the copora and parsing data
  #
  ${NLPLROOT}/operation/mirror/data/parsing/puhti;

  #
  # maintain a back-up on the Norwegian NIRD facility
  #
  ${NLPLROOT}/operation/mirror/nird;

fi


if [ -d /projappl/nlpl ]; then

  NLPLROOT=/projapp/nlpl;

  #
  # first things first: make sure we are running current scripts
  #
  cd ${NLPLROOT}/operation;
  svn up;

  #
  # replicate the translation training data to Norway
  #
  ${NLPLROOT}/operation/mirror/data/translation/saga;

  #
  # maintain a back-up on the Norwegian NIRD facility
  #
  ${NLPLROOT}/operation/mirror/nird;

fi
