#!/bin/msh
#write-dist <OPTION> : write a tar tape to gannet (1600 bpi) over Ethernet
#	containing Poly/ML and Isabelle
#see ~rmt/mtshell for more info 
#   ???could shar be useful via EMAIL???
cd /usr/users/dcjm/distrib
#first check command...
case "$1" in
    vax)  echo 'Sources plus ML for VAX';;
    sun3) echo 'Sources plus ML for Sun-3';;
    both) echo 'Sources plus ML for both VAX and Sun-3';;
    src)  echo 'Sources only: no ML';;
    *)    echo 'option must be one of: vax sun3 both src!' >&2; exit 1;;
    esac
#...then write tape!
case "$1" in
    vax)  tar cvfb - 20 READ_ME driver -C vax poly_dbase -C /usr/lib isabelle/dist;;
    sun3) tar cvfb - 20 READ_ME driver -C sun3 poly_dbase -C /usr/lib isabelle/dist;;
    both) tar cvfb - 20 READ_ME driver sun3/poly_dbase vax/poly_dbase \
			-C /usr/lib isabelle/dist;;
    src)  tar cvfb - 20 -C /usr/lib isabelle/dist;;
    esac | rsh gannet -l rmt write /dev/rmt0
#...then verify
rsh gannet -l rmt -n read /dev/rmt0  |  tar tvf - 
