--- freem/scripts/fmd-setversion 2025/04/04 19:43:18 1.2
+++ freem/scripts/fmd-setversion 2025/04/06 03:38:05 1.3
@@ -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.3 2025/04/06 03:38:05 snw Exp $
# Set version in FreeM repository
#
#
@@ -25,6 +25,9 @@
# along with FreeM. If not, see .
#
# $Log: fmd-setversion,v $
+# 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 +39,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