Annotation of freem/scripts/fmd-commit, revision 1.3

1.1       snw         1: #!/usr/bin/env bash
                      2: 
                      3: #
1.3     ! snw         4: #   $Id: fmd-commit,v 1.2 2025/04/04 18:14:56 snw Exp $
1.1       snw         5: #    Commit to FreeM repository
                      6: #
                      7: #  
                      8: #   Author: Serena Willis <snw@coherent-logic.com>
                      9: #    Copyright (C) 2025 Coherent Logic Development LLC
                     10: #
                     11: #
                     12: #   This file is part of FreeM.
                     13: #
                     14: #   FreeM is free software: you can redistribute it and/or modify
                     15: #   it under the terms of the GNU Affero Public License as published by
                     16: #   the Free Software Foundation, either version 3 of the License, or
                     17: #   (at your option) any later version.
                     18: #
                     19: #   FreeM is distributed in the hope that it will be useful,
                     20: #   but WITHOUT ANY WARRANTY; without even the implied warranty of
                     21: #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     22: #   GNU Affero Public License for more details.
                     23: #
                     24: #   You should have received a copy of the GNU Affero Public License
                     25: #   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
                     26: #
1.2       snw        27: #   $Log: fmd-commit,v $
1.3     ! snw        28: #   Revision 1.2  2025/04/04 18:14:56  snw
        !            29: #   Fix log and commit scripts
        !            30: #
1.2       snw        31: #   Revision 1.1  2025/04/04 18:00:01  snw
                     32: #   *** empty log message ***
                     33: #
1.1       snw        34: #
                     35: # SPDX-FileCopyrightText:  (C) 2025 Coherent Logic Development LLC
                     36: # SPDX-License-Identifier: AGPL-3.0-or-later
                     37: #
                     38: 
                     39: function usage() {
                     40:     echo "usage:  fmd commit <commit-message>"
                     41:     exit 1
                     42: }
                     43: 
                     44: if [[ $# == 0 ]]
                     45: then
                     46:     echo "commit:  must be run from 'fmd commit'"
                     47:     exit 1
                     48: fi
                     49: 
                     50: if [[ ! -f sem.ver ]]
                     51: then
                     52:     echo "Not in the root of the FreeM repository."
                     53:     exit 1
                     54: fi
                     55: 
                     56: if [[ $# != 2 ]]
                     57: then
                     58:     usage
                     59: fi
                     60: 
1.3     ! snw        61: FMD="$1"
1.2       snw        62: COMMIT_MESSAGE="$2"
1.1       snw        63: 
                     64: ${FMD} log "${COMMIT_MESSAGE}"
                     65: cvs ci -m "${COMMIT_MESSAGE}"
                     66: 

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