Annotation of freem/scripts/fmd-docupdate, revision 1.1

1.1     ! snw         1: #!/usr/bin/env bash
        !             2: 
        !             3: #
        !             4: #   $Id$
        !             5: #    Upload the current documentation to the FreeM website
        !             6: #
        !             7: #  
        !             8: #   Author: Serena Willis <snw@coherent-logic.com>
        !             9: #    Copyright (C) 1998 MUG Deutschland
        !            10: #    Copyright (C) 2025 Coherent Logic Development LLC
        !            11: #
        !            12: #
        !            13: #   This file is part of FreeM.
        !            14: #
        !            15: #   FreeM is free software: you can redistribute it and/or modify
        !            16: #   it under the terms of the GNU Affero Public License as published by
        !            17: #   the Free Software Foundation, either version 3 of the License, or
        !            18: #   (at your option) any later version.
        !            19: #
        !            20: #   FreeM is distributed in the hope that it will be useful,
        !            21: #   but WITHOUT ANY WARRANTY; without even the implied warranty of
        !            22: #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        !            23: #   GNU Affero Public License for more details.
        !            24: #
        !            25: #   You should have received a copy of the GNU Affero Public License
        !            26: #   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
        !            27: #
        !            28: #   $Log$
        !            29: #
        !            30: # SPDX-FileCopyrightText:  (C) 2025 Coherent Logic Development LLC
        !            31: # SPDX-License-Identifier: AGPL-3.0-or-later
        !            32: #
        !            33: 
        !            34: 
        !            35: PGM=$(basename $0)
        !            36: 
        !            37: function usage() {
        !            38:     echo "usage:  fmd docupdate <ssh-server>"
        !            39:     exit 1
        !            40: }
        !            41: 
        !            42: 
        !            43: if [[ $# == 0 ]]
        !            44: then
        !            45:     echo "fmd-docupdate:  must be run from 'fmd docupdate'"
        !            46:     exit 1
        !            47: fi
        !            48: 
        !            49: if [[ ! -f sem.ver ]]
        !            50: then
        !            51:     echo "Not in the root of the FreeM repository."
        !            52:     exit 1
        !            53: fi
        !            54: 
        !            55: NEWVER=$(cat sem.ver)
        !            56: 
        !            57: if [[ $# != 2 ]]
        !            58: then
        !            59:     usage
        !            60: fi
        !            61: 
        !            62: SSHCRED=$2
        !            63: 
        !            64: cd doc/
        !            65: ./crdocs.sh
        !            66: 
        !            67: DOCDIR="//var/www/freem.coherent-logic.com/docs/${NEWVER}/"
        !            68: 
        !            69: ssh "${SSHCRED}" "mkdir ${DOCDIR}"
        !            70: if [[ $? != 0 ]]
        !            71: then
        !            72:     echo "${PGM}:  error creating remote directory"
        !            73:     exit 1
        !            74: fi
        !            75: 
        !            76: scp freem.texi freem/*.html freem.ps freem.pdf freem.info.gz "${SSHCRED}:${DOCDIR}/"
        !            77: if [[ $? != 0 ]]
        !            78: then
        !            79:     echo "${PGM}:  error copying docs"
        !            80:     exit 1
        !            81: fi
        !            82: 
        !            83: make -f Makefile.orig clean

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>