--- freem/scripts/fmd-setversion 2025/04/04 19:43:18 1.2 +++ freem/scripts/fmd-setversion 2025/05/02 16:25:46 1.4 @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# $Id: fmd-setversion,v 1.2 2025/04/04 19:43:18 snw Exp $ +# $Id: fmd-setversion,v 1.4 2025/05/02 16:25:46 snw Exp $ # Set version in FreeM repository # # @@ -25,6 +25,12 @@ # along with FreeM. If not, see . # # $Log: fmd-setversion,v $ +# Revision 1.4 2025/05/02 16:25:46 snw +# -m +# +# Revision 1.3 2025/04/06 03:38:05 snw +# Prepare for adding packaging functionality to fmd +# # Revision 1.2 2025/04/04 19:43:18 snw # Switch to using environment catalog to determine user and group for environment, and remove -u and -g flags from freem # @@ -36,15 +42,30 @@ # SPDX-License-Identifier: AGPL-3.0-or-later # -if [[ $# == 0 ]] +function usage() +{ + echo + echo "Sets the FreeM version in this repository" + echo + echo "usage:" + echo + echo " fmd setversion " + echo " - Sets the FreeM version in this repository to " + echo + echo " fmd setversion --revert" + echo " - Reverts to the previous FreeM version" + echo + exit 0 +} + +if [[ $1 == "help" ]] then - echo "setversion: must be run from 'fmd setversion'" - exit 1 + usage fi -if [[ ! -f sem.ver ]] +if [[ $# == 0 ]] then - echo "Not in the root of the FreeM repository." + echo "setversion: must be run from 'fmd setversion'" exit 1 fi @@ -79,6 +100,7 @@ echo "${NEWVER}" > sem.ver sed -i.orig "s/${CURVER}/${NEWVER}/g" doc/freem.texi sed -i.orig "s/${CURVER}/${NEWVER}/g" configure.ac +sed -i.orig "s/${CURVER}/${NEWVER}/g" doc/freem_conformance.1 VERSTR="VERSION ${NEWVER}"