#! /bin/sh
prg="upload"
scp=$(which scp)
dest="goiwai@shells.sourceforge.jp:/var/autofs/misc/groups/c/cl/cldaq/htdocs/publications/"
if [ $# -ne 1 ] || [ ! -f $1 ] || [ $1 = "default.mgp" ]; then
    echo "Usage: $prg <filenmae>"
    exit 1
fi

f="$1"
d=${f%%.mgp}
if [ ! -d $d ]; then
    ./mgp2html $f
fi
$scp -r $d $dest

exit 0
