1: #!/usr/bin/env bash
2:
3: #
4: # $Id: fmd-versions,v 1.2 2025/04/06 03:38:05 snw Exp $
5: # Gets the changelog for a specific version
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: #
27: # $Log: fmd-versions,v $
28: # Revision 1.2 2025/04/06 03:38:05 snw
29: # Prepare for adding packaging functionality to fmd
30: #
31: # Revision 1.1 2025/04/04 18:30:03 snw
32: # Add fmd versions command to list all versions
33: #
34: #
35: #
36: # SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
37: # SPDX-License-Identifier: AGPL-3.0-or-later
38: #
39:
40: function usage() {
41: echo
42: echo "Prints a list of all known FreeM versions"
43: echo
44: echo "usage: "
45: echo
46: echo " fmd versions"
47: echo
48: exit 0
49: }
50:
51: if [[ $1 == "help" ]]
52: then
53: usage
54: fi
55:
56: if [[ $# == 0 ]]
57: then
58: echo "versions: must be run from 'fmd versions'"
59: exit 1
60: fi
61:
62: if [[ ! -f sem.ver ]]
63: then
64: echo "Not in the root of the FreeM repository."
65: exit 1
66: fi
67:
68: FMD="$1"
69:
70: cat ChangeLog | egrep "^VERSION" | cut -d" " -f2
71:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>