diff tools/makeinst-script.sh.in @ 4752:e839056b9a65

Allow building of unreleased stable branch (4.4.0x) (bug #54176). * src/stable-octave.mk: Define PKG_VERSION to 4.4.0x to match configure.ac for stable branch. Define new variable PKG_WIN_VERSION=4.4.0.5 which is used for unreleased stable branch on Windows. Write PKG_WIN_VERSION to octave-version file. * tools/makeinst-script.sh.in: Define new INSTALLER_VERSION variable. If VERSION is already 4 digits (4.4.0.5) then leave unchanged, otherwise add a fourth zero so that version number matches windows expectations.
author Rik <rik@octave.org>
date Tue, 03 Jul 2018 19:00:22 -0700
parents 12bfaba26c8d
children e76d54c038ef
line wrap: on
line diff
--- a/tools/makeinst-script.sh.in	Mon Jul 02 07:55:22 2018 -0400
+++ b/tools/makeinst-script.sh.in	Tue Jul 03 19:00:22 2018 -0700
@@ -29,6 +29,11 @@
 # extract version number
 OCTAVE_VERSION=`head -1 $MXEDIR/octave/octave-version`
 VERSION=`echo $OCTAVE_VERSION | sed -n 's,\([0-9\.]*\).*,\1,p'`
+if [ `echo $VERSION | grep -o '\.' | wc -l` -le 2 ]; then
+  INSTALLER_VERSION="$VERSION.0"
+else
+  INSTALLER_VERSION=$VERSION
+fi
 
 # estimated size of installed files
 SIZE=`du -slk $OCTAVE_SOURCE | awk '{print \$1}'`
@@ -41,7 +46,7 @@
 !define APP_NAME "GNU Octave"
 !define COMP_NAME "GNU Project"
 !define WEB_SITE "https://www.octave.org"
-!define VERSION "$VERSION.0"
+!define VERSION "$INSTALLER_VERSION"
 !define OCTAVE_VERSION "$OCTAVE_VERSION"
 !define COPYRIGHT "Copyright © 2013-2018 John W. Eaton and others."
 !define DESCRIPTION "GNU Octave is a high-level programming language, primarily intended for numerical computations."