File:  [Coherent Logic Development] / freem / scripts / upload-docs
Revision 1.3: download - view: text, annotated - select for diffs
Sun Mar 23 19:42:18 2025 UTC (9 days, 4 hours ago) by snw
Branches: MAIN
CVS tags: v0-62-3, HEAD
Back to cvs-current versioning for continued development work

#!/usr/bin/env bash

#
#   $Id: upload-docs,v 1.3 2025/03/23 19:42:18 snw Exp $
#    Upload the current documentation to the FreeM website
#
#  
#   Author: Serena Willis <snw@coherent-logic.com>
#    Copyright (C) 1998 MUG Deutschland
#    Copyright (C) 2025 Coherent Logic Development LLC
#
#
#   This file is part of FreeM.
#
#   FreeM is free software: you can redistribute it and/or modify
#   it under the terms of the GNU Affero Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   FreeM is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU Affero Public License for more details.
#
#   You should have received a copy of the GNU Affero Public License
#   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
#
#   $Log: upload-docs,v $
#   Revision 1.3  2025/03/23 19:42:18  snw
#   Back to cvs-current versioning for continued development work
#
#   Revision 1.2  2025/03/16 16:10:03  snw
#   Add script header to doc upload script
#
#
# SPDX-FileCopyrightText:  (C) 2025 Coherent Logic Development LLC
# SPDX-License-Identifier: AGPL-3.0-or-later
#


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>