#!/bin/sh

# Script to cause a remote system to retrieve the latest tar file
# from the incoming ftp directory.  Useful to update systems after
# running distribute_tar.  Note the different call for systems at
# Komaba, because of the different FTP structure there.  At present,
# there is no "get_tar" script for IAS.

site="$1"
cmd=get_tar

case "$1" in
  komaba|tokyo) site=kyohou.c.u-tokyo.ac.jp ;;
esac

case "$site" in
  kyohou.c.u-tokyo.ac.jp) cmd=komaba_get_tar ;;
esac

ssh -l starlab $site "setenv STARLAB_PATH ~/starlab ; source $STARLAB_PATH/starlab_start ; cd $STARLAB_PATH ; sbin/$cmd"
