Annotation of freem/scripts/upload-docs, revision 1.1
1.1 ! snw 1: #!/usr/bin/env bash
! 2:
! 3: PGM=$(basename $0)
! 4:
! 5: function usage() {
! 6: echo "usage: ${PGM} <ssh-server>"
! 7: exit 1
! 8: }
! 9:
! 10: if [[ $# != 1 ]]
! 11: then
! 12: usage
! 13: fi
! 14:
! 15: SSHCRED=$1
! 16:
! 17: if [[ ! -f sem.ver ]]
! 18: then
! 19: echo "${PGM}: not in the root of the freem repository"
! 20: exit 1
! 21: else
! 22: NEWVER=$(cat sem.ver)
! 23: fi
! 24:
! 25: cd doc/
! 26: ./crdocs.sh
! 27:
! 28: DOCDIR="//var/www/freem.coherent-logic.com/docs/${NEWVER}/"
! 29:
! 30: ssh "${SSHCRED}" "mkdir ${DOCDIR}"
! 31: if [[ $? != 0 ]]
! 32: then
! 33: echo "${PGM}: error creating remote directory"
! 34: exit 1
! 35: fi
! 36:
! 37: scp freem.texi freem/*.html freem.ps freem.pdf freem.info.gz "${SSHCRED}:${DOCDIR}/"
! 38: if [[ $? != 0 ]]
! 39: then
! 40: echo "${PGM}: error copying docs"
! 41: exit 1
! 42: fi
! 43:
! 44: make -f Makefile.orig clean
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>