Annotation of freem/scripts/fmd-docupdate, revision 1.3
1.1 snw 1: #!/usr/bin/env bash
2:
3: #
1.3 ! snw 4: # $Id: fmd-docupdate,v 1.2 2025/04/06 03:38:05 snw Exp $
1.1 snw 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: #
1.2 snw 28: # $Log: fmd-docupdate,v $
1.3 ! snw 29: # Revision 1.2 2025/04/06 03:38:05 snw
! 30: # Prepare for adding packaging functionality to fmd
! 31: #
1.2 snw 32: # Revision 1.1 2025/04/05 03:18:41 snw
33: # Add fmd docupdate command to dev scripts
34: #
1.1 snw 35: #
36: # SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
37: # SPDX-License-Identifier: AGPL-3.0-or-later
38: #
39:
40:
41: PGM=$(basename $0)
42:
43: function usage() {
1.2 snw 44: echo
45: echo "Uploads current documentation to the FreeM website"
46: echo
47: echo "usage:"
48: echo
49: echo " fmd docupdate <ssh-server>"
50: echo
51: echo " The <ssh-server> argument should be in the format 'username@fqdn'."
52: echo " Do NOT specify anything else."
53: echo
54: exit 0
1.1 snw 55: }
56:
1.2 snw 57: if [[ $1 == "help" ]]
58: then
59: usage
60: fi
1.1 snw 61:
62: if [[ $# == 0 ]]
63: then
64: echo "fmd-docupdate: must be run from 'fmd docupdate'"
65: exit 1
66: fi
67:
68: NEWVER=$(cat sem.ver)
69:
70: if [[ $# != 2 ]]
71: then
72: usage
73: fi
74:
75: SSHCRED=$2
76:
77: cd doc/
78: ./crdocs.sh
79:
80: DOCDIR="//var/www/freem.coherent-logic.com/docs/${NEWVER}/"
81:
1.3 ! snw 82: ssh "${SSHCRED}" "mkdir -p ${DOCDIR}"
1.1 snw 83: if [[ $? != 0 ]]
84: then
85: echo "${PGM}: error creating remote directory"
86: exit 1
87: fi
88:
89: scp freem.texi freem/*.html freem.ps freem.pdf freem.info.gz "${SSHCRED}:${DOCDIR}/"
90: if [[ $? != 0 ]]
91: then
92: echo "${PGM}: error copying docs"
93: exit 1
94: fi
95:
96: make -f Makefile.orig clean
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>