#!/usr/bin/env bash
PGM=$(basename $0)
function usage() {
echo "usage: ${PGM} <ssh-server>"
exit 1
}
if [[ $# != 1 ]]
then
usage
fi
SSHCRED=$1
if [[ ! -f sem.ver ]]
then
echo "${PGM}: not in the root of the freem repository"
exit 1
else
NEWVER=$(cat sem.ver)
fi
cd doc/
./crdocs.sh
DOCDIR="//var/www/freem.coherent-logic.com/docs/${NEWVER}/"
ssh "${SSHCRED}" "mkdir ${DOCDIR}"
if [[ $? != 0 ]]
then
echo "${PGM}: error creating remote directory"
exit 1
fi
scp freem.texi freem/*.html freem.ps freem.pdf freem.info.gz "${SSHCRED}:${DOCDIR}/"
if [[ $? != 0 ]]
then
echo "${PGM}: error copying docs"
exit 1
fi
make -f Makefile.orig clean
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>