diff --git a/openfoam-selector/LICENSE b/openfoam-selector/LICENSE
index 4f4d392ad481e0f6e5e1c9fd2b6f069b5ef9481e..583e14336827dc132be90d09f1627c53723b03d4 100644
--- a/openfoam-selector/LICENSE
+++ b/openfoam-selector/LICENSE
@@ -4,7 +4,7 @@ $COPYRIGHT$
Additional copyrights may follow
-Copyright (C) 2018 OpenCFD Ltd.
+Copyright (C) 2018-2020 OpenCFD Ltd.
$HEADER$
diff --git a/openfoam-selector/VERSION b/openfoam-selector/VERSION
index ee90284c27f187a315f1267b063fa81b5b84f613..90a27f9cea6e8f02e05a8bbab5d14650e3e932af 100644
--- a/openfoam-selector/VERSION
+++ b/openfoam-selector/VERSION
@@ -1 +1 @@
-1.0.4
+1.0.5
diff --git a/openfoam-selector/configure b/openfoam-selector/configure
index 2386fdde8cbb4a18abe801e28103baa2d6287ac7..26ce056a1ca60198a30568679a51ec9b162badbc 100755
--- a/openfoam-selector/configure
+++ b/openfoam-selector/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for openfoam-selector 1.0.3.
+# Generated by GNU Autoconf 2.69 for openfoam-selector 1.0.5.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -576,8 +576,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='openfoam-selector'
PACKAGE_TARNAME='openfoam-selector'
-PACKAGE_VERSION='1.0.3'
-PACKAGE_STRING='openfoam-selector 1.0.3'
+PACKAGE_VERSION='1.0.5'
+PACKAGE_STRING='openfoam-selector 1.0.5'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -586,9 +586,9 @@ LIBOBJS
MAN_DATE
OPENFOAM_SELECTOR_HOME_FILE
OPENFOAM_SELECTOR_SYSCONFIG_FILE
+OPENFOAM_SELECTOR_SHELL_STARTUP_DIR
OPENFOAM_SELECTOR_SYSCONFDIR
OPENFOAM_SELECTOR_DATADIR
-OPENFOAM_SELECTOR_SHELL_STARTUP_DIR
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
@@ -658,6 +658,7 @@ ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_silent_rules
+with_sysconf_dir
with_shell_startup_dir
'
ac_precious_vars='build_alias
@@ -1203,7 +1204,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures openfoam-selector 1.0.3 to adapt to many kinds of systems.
+\`configure' configures openfoam-selector 1.0.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1270,7 +1271,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of openfoam-selector 1.0.3:";;
+ short | recursive ) echo "Configuration of openfoam-selector 1.0.5:";;
esac
cat <<\_ACEOF
@@ -1284,7 +1285,8 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-shell-startup-dir=
+ --with-sysconf-dir=DIR Directory where system config files are to be stored
+ --with-shell-startup-dir=DIR
Directory where shell startup files are installed
(default: $pkgdatadir)
@@ -1351,7 +1353,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-openfoam-selector configure 1.0.3
+openfoam-selector configure 1.0.5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1368,7 +1370,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by openfoam-selector $as_me 1.0.3, which was
+It was created by openfoam-selector $as_me 1.0.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2231,7 +2233,7 @@ fi
# Define the identity of the package.
PACKAGE='openfoam-selector'
- VERSION='1.0.3'
+ VERSION='1.0.5'
cat >>confdefs.h <<_ACEOF
@@ -2325,50 +2327,71 @@ END
fi
-# Setup some directory names and filenames that are common across all
-# the scripts
+# Setup directory/file names common across scripts
prefix_save=$prefix
if test "NONE" = "$prefix"; then
prefix=/usr/local
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking shell startup file directory" >&5
-$as_echo_n "checking shell startup file directory... " >&6; }
-
-# Check whether --with-shell-startup-dir was given.
-if test "${with_shell_startup_dir+set}" = set; then :
- withval=$with_shell_startup_dir;
-fi
-
-if test "$with_shell_startup_dir" == ""; then
- OPENFOAM_SELECTOR_SHELL_STARTUP_DIR='$(pkgdatadir)'
-else
- OPENFOAM_SELECTOR_SHELL_STARTUP_DIR=$with_shell_startup_dir
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENFOAM_SELECTOR_SHELL_STARTUP_DIR" >&5
-$as_echo "$OPENFOAM_SELECTOR_SHELL_STARTUP_DIR" >&6; }
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking repository directory" >&5
$as_echo_n "checking repository directory... " >&6; }
localstatedir_save="$localstatedir"
eval localstatedir="$localstatedir"
eval OPENFOAM_SELECTOR_DATADIR="$localstatedir/openfoam-selector/data"
-
localstatedir="$localstatedir_save"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENFOAM_SELECTOR_DATADIR" >&5
$as_echo "$OPENFOAM_SELECTOR_DATADIR" >&6; }
+# Normally store data under /etc/sysconf/...
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking system configuration directory" >&5
$as_echo_n "checking system configuration directory... " >&6; }
sysconfdir_save="$sysconfdir"
eval sysconfdir="$sysconfdir"
eval OPENFOAM_SELECTOR_SYSCONFDIR="$sysconfdir/sysconfig"
-
sysconfdir="$sysconfdir_save"
+# Delay substitution until after --with-sysconf-dir
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENFOAM_SELECTOR_SYSCONFDIR" >&5
+$as_echo "$OPENFOAM_SELECTOR_SYSCONFDIR" >&6; }
+
+# But no /etc/sysconf for debian, so use something like /etc/openfoam/...
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alternative system config directory" >&5
+$as_echo_n "checking alternative system config directory... " >&6; }
+
+# Check whether --with-sysconf-dir was given.
+if test "${with_sysconf_dir+set}" = set; then :
+ withval=$with_sysconf_dir;
+fi
+
+
+if test -n "$with_sysconf_dir"; then
+ OPENFOAM_SELECTOR_SYSCONFDIR="$with_sysconf_dir"
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENFOAM_SELECTOR_SYSCONFDIR" >&5
$as_echo "$OPENFOAM_SELECTOR_SYSCONFDIR" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking shell startup file directory" >&5
+$as_echo_n "checking shell startup file directory... " >&6; }
+
+# Check whether --with-shell-startup-dir was given.
+if test "${with_shell_startup_dir+set}" = set; then :
+ withval=$with_shell_startup_dir;
+fi
+
+
+if test "$with_shell_startup_dir" == ""; then
+ OPENFOAM_SELECTOR_SHELL_STARTUP_DIR='$(pkgdatadir)'
+else
+ OPENFOAM_SELECTOR_SHELL_STARTUP_DIR="$with_shell_startup_dir"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENFOAM_SELECTOR_SHELL_STARTUP_DIR" >&5
+$as_echo "$OPENFOAM_SELECTOR_SHELL_STARTUP_DIR" >&6; }
+
+
OPENFOAM_SELECTOR_SYSCONFIG_FILE="openfoam-selector"
OPENFOAM_SELECTOR_HOME_FILE=".openfoam-selector"
@@ -2936,7 +2959,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by openfoam-selector $as_me 1.0.3, which was
+This file was extended by openfoam-selector $as_me 1.0.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -2993,7 +3016,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-openfoam-selector config.status 1.0.3
+openfoam-selector config.status 1.0.5
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/openfoam-selector/configure.ac b/openfoam-selector/configure.ac
index 2e3bc860d72bdf2345b2a07b0c10985fd3bdf559..6cceaa0d52e2f72faee7eed507b82a3dde9304db 100644
--- a/openfoam-selector/configure.ac
+++ b/openfoam-selector/configure.ac
@@ -1,6 +1,6 @@
# -*- shell-script -*-
# Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
-# Copyright (C) 2018 OpenCFD Ltd.
+# Copyright (C) 2018-2020 OpenCFD Ltd.
# Startup
AC_INIT([openfoam-selector],
@@ -8,41 +8,57 @@ AC_INIT([openfoam-selector],
[], [openfoam-selector])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
-# Setup some directory names and filenames that are common across all
-# the scripts
+# Setup directory/file names common across scripts
prefix_save=$prefix
if test "NONE" = "$prefix"; then
prefix=/usr/local
fi
-AC_MSG_CHECKING([shell startup file directory])
-AC_ARG_WITH([shell-startup-dir],
- AC_HELP_STRING([--with-shell-startup-dir=],
- [Directory where shell startup files are installed (default: $pkgdatadir)]))
-if test "$with_shell_startup_dir" == ""; then
- OPENFOAM_SELECTOR_SHELL_STARTUP_DIR='$(pkgdatadir)'
-else
- OPENFOAM_SELECTOR_SHELL_STARTUP_DIR=$with_shell_startup_dir
-fi
-AC_SUBST(OPENFOAM_SELECTOR_SHELL_STARTUP_DIR)
-AC_MSG_RESULT([$OPENFOAM_SELECTOR_SHELL_STARTUP_DIR])
-
AC_MSG_CHECKING([repository directory])
localstatedir_save="$localstatedir"
eval localstatedir="$localstatedir"
eval OPENFOAM_SELECTOR_DATADIR="$localstatedir/openfoam-selector/data"
-AC_SUBST(OPENFOAM_SELECTOR_DATADIR)
localstatedir="$localstatedir_save"
+AC_SUBST(OPENFOAM_SELECTOR_DATADIR)
AC_MSG_RESULT([$OPENFOAM_SELECTOR_DATADIR])
+# Normally store data under /etc/sysconf/...
AC_MSG_CHECKING([system configuration directory])
sysconfdir_save="$sysconfdir"
eval sysconfdir="$sysconfdir"
eval OPENFOAM_SELECTOR_SYSCONFDIR="$sysconfdir/sysconfig"
-AC_SUBST(OPENFOAM_SELECTOR_SYSCONFDIR)
sysconfdir="$sysconfdir_save"
+# Delay substitution until after --with-sysconf-dir
+AC_MSG_RESULT([$OPENFOAM_SELECTOR_SYSCONFDIR])
+
+# But no /etc/sysconf for debian, so use something like /etc/openfoam/...
+
+AC_MSG_CHECKING([alternative system config directory])
+AC_ARG_WITH([sysconf-dir],
+ AC_HELP_STRING([--with-sysconf-dir=DIR],
+ [Directory where system config files are to be stored]))
+
+if test -n "$with_sysconf_dir"; then
+ OPENFOAM_SELECTOR_SYSCONFDIR="$with_sysconf_dir"
+fi
+AC_SUBST(OPENFOAM_SELECTOR_SYSCONFDIR)
AC_MSG_RESULT([$OPENFOAM_SELECTOR_SYSCONFDIR])
+
+AC_MSG_CHECKING([shell startup file directory])
+AC_ARG_WITH([shell-startup-dir],
+ AC_HELP_STRING([--with-shell-startup-dir=DIR],
+ [Directory where shell startup files are installed (default: $pkgdatadir)]))
+
+if test "$with_shell_startup_dir" == ""; then
+ OPENFOAM_SELECTOR_SHELL_STARTUP_DIR='$(pkgdatadir)'
+else
+ OPENFOAM_SELECTOR_SHELL_STARTUP_DIR="$with_shell_startup_dir"
+fi
+AC_SUBST(OPENFOAM_SELECTOR_SHELL_STARTUP_DIR)
+AC_MSG_RESULT([$OPENFOAM_SELECTOR_SHELL_STARTUP_DIR])
+
+
OPENFOAM_SELECTOR_SYSCONFIG_FILE="openfoam-selector"
OPENFOAM_SELECTOR_HOME_FILE=".openfoam-selector"
AC_SUBST(OPENFOAM_SELECTOR_SYSCONFIG_FILE)
diff --git a/openfoam-selector/make_deb_tar b/openfoam-selector/make_deb_tar
new file mode 100755
index 0000000000000000000000000000000000000000..7d618fde840041cc7c79c5afdc1423736d9ad8e4
--- /dev/null
+++ b/openfoam-selector/make_deb_tar
@@ -0,0 +1,37 @@
+#!/bin/sh
+#------------------------------------------------------------------------------
+# ========= |
+# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+# \\ / O peration |
+# \\ / A nd | www.openfoam.com
+# \\/ M anipulation |
+#-------------------------------------------------------------------------------
+# Copyright (C) 2020 OpenCFD Ltd.
+#-------------------------------------------------------------------------------
+# SPDX-License-Identifier: (GPL-3.0+)
+#
+# Script
+# make_orig_tar
+#
+# Description
+# Create openfoam-selector orig.tar.xz file (debian naming)
+# from current HEAD
+#
+#-------------------------------------------------------------------------------
+cd "${0%/*}" || exit
+
+package="openfoam-selector"
+version="$(cat VERSION)"
+
+[ -n "$version" ] || {
+ echo "No version info" 1>&2
+ exit 2
+}
+
+set -x
+git -c tar.tar.xz.command='xz -c' archive --format=tar.xz \
+ --output="${package}_${version}.orig.tar.xz" \
+ --verbose \
+ HEAD
+
+#-------------------------------------------------------------------------------
diff --git a/openfoam-selector/make_tgz b/openfoam-selector/make_tgz
index 3f8cb7649fac64663c5834901157dff771ea8db3..f96e153dbda0a4d47ab4f879921b02127267de6a 100755
--- a/openfoam-selector/make_tgz
+++ b/openfoam-selector/make_tgz
@@ -3,35 +3,34 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
+# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#-------------------------------------------------------------------------------
-# License
-# This file is part of OpenFOAM, licensed under GNU General Public License
-# .
+# Copyright (C) 2018-2020 OpenCFD Ltd.
+#-------------------------------------------------------------------------------
+# SPDX-License-Identifier: (GPL-3.0+)
#
# Script
-# makeTar
+# make_tgz
#
# Description
-# Create tar.gz file from current HEAD
+# Create openfoam-selector tgz file from current HEAD
#
#-------------------------------------------------------------------------------
-cd "${0%/*}" || exit 1
-
-set -x
+cd "${0%/*}" || exit
-VERSION="$(cat VERSION)"
+package="openfoam-selector"
+version="$(cat VERSION)"
-[ -n "$VERSION" ] || {
- echo "No VERSION info"
+[ -n "$version" ] || {
+ echo "No version info" 1>&2
exit 2
}
-git archive \
- --format=tgz \
- --prefix="openfoam-selector-${VERSION}/" \
- --output="openfoam-selector-${VERSION}.tgz" \
+set -x
+git archive --format=tgz \
+ --prefix="${package}-${version}/" \
+ --output="${package}-${version}.tgz" \
--verbose \
HEAD
diff --git a/openfoam-selector/openfoam-selector-menu b/openfoam-selector/openfoam-selector-menu
index e6843ed32f89a7e72c955d08b4fafca7bef56624..552bde40350dda7cfa841589952230f71f870b5c 100755
--- a/openfoam-selector/openfoam-selector-menu
+++ b/openfoam-selector/openfoam-selector-menu
@@ -1,7 +1,7 @@
#!/usr/bin/perl
#
# Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
-# Copyright (C) 2018 OpenCFD Ltd.
+# Copyright (C) 2018-2020 OpenCFD Ltd.
#
# Simple perl script to effect system-wide and per-user default
# selections of which MPI implementation to use.
@@ -15,7 +15,7 @@ use Text::Wrap;
=head1 NAME
-openfoam-selector-menu - A menu-based wrapper around the openfoam-selector command
+openfoam-selector-menu - Menu wrapper for the openfoam-selector command
=head1 SYNOPSIS
@@ -28,14 +28,14 @@ Adapted from mpi-selector-menu.
=head1 AUTHOR
-Written by Jeff Squyres.
+Written by Jeff Squyres. OPENFOAM modifications by Mark Olesen.
=head1 REPORTING BUGS
-Send bug reports to the OpenFabrics general mailing list (see
-L). This is a high-volume mailing list,
-so be sure to put "openfoam-selector" in the subject to ensure that it is
-not missed.
+Presumably not many bugs left.
+Report any issues on the regular OPENFOAM channel:
+L or
+L
=head1 COPYRIGHT
@@ -45,7 +45,7 @@ This is free software; see the source for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
-Copyright (C) 2018 OpenCFD Ltd.
+Copyright (C) 2018-2020 OpenCFD Ltd.
=head1 SEE ALSO
@@ -167,7 +167,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Jeff Squyres.
-Changes Copyright (C) 2018 OpenCFD Ltd.\n";
+Changes Copyright (C) 2018-2020 OpenCFD Ltd.\n";
exit(0);
}
diff --git a/openfoam-selector/openfoam-selector.in b/openfoam-selector/openfoam-selector.in
index 4e8dfba949679296279f55da2bb272a2c64b68ec..1923a97eec1f4b2f3c22709e0dc40a6e5510539d 100644
--- a/openfoam-selector/openfoam-selector.in
+++ b/openfoam-selector/openfoam-selector.in
@@ -1,7 +1,7 @@
#!/usr/bin/perl
#
# Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
-# Copyright (C) 2018 OpenCFD Ltd.
+# Copyright (C) 2018-2020 OpenCFD Ltd.
#
# Simple perl script to effect system-wide and per-user default
# selections of which OPENFOAM to use.
@@ -15,7 +15,7 @@ use Text::Wrap;
=head1 NAME
-openfoam-selector - A simple site-wide/per-user OPENFOAM versions selection tool
+openfoam-selector - Simple site-wide/per-user OPENFOAM version selection tool
=head1 SYNOPSIS
@@ -180,10 +180,10 @@ The I<--list> option to the openfoam-selector command shows a simple list
of which OPENFOAM versions are available:
shell$ openfoam-selector --list
- openfoam-1.5
- openfoam-2.2
- openfoam-1712
- openfoam-1806
+ openfoam1812
+ openfoam1906
+ openfoam1912
+ openfoam2006
shell$
=head3 Setting a default
@@ -192,7 +192,7 @@ By default, OPENFOAM selections are performed on a per-user basis with the
I<--set> option, using a name from the list of available OPENFOAM
versions (which can be obtained via the I<--list> command):
- shell$ openfoam-selector --set openfoam-1712
+ shell$ openfoam-selector --set openfoam1912
shell$
Note that the default takes effect in the I shell that is
@@ -203,15 +203,15 @@ interactive confirmation prompt. This interactive prompt can be
avoided by using the I<--yes> option, which assumes a "yes" answer to
all questions:
- shell$ openfoam-selector --set openfoam-1806
- shell$ openfoam-selector --set openfoam-1806 --yes
+ shell$ openfoam-selector --set openfoam1912
+ shell$ openfoam-selector --set openfoam1912 --yes
shell$
If the I<--system> option is used, the site-wide default is modified
instead of the per-user default. Since this option typically reqires
writing files into protected areas, root access may be required.
- shell# openfoam-selector --set openfoam-1806 --system
+ shell# openfoam-selector --set openfoam1912 --system
shell#
=head3 Unsetting a default
@@ -287,9 +287,9 @@ confirmation prompt; the I<--yes> option can be supplied to assume
"yes" to all questions asked:
shell# openfoam-selector --list
- openfoam-1806
+ openfoam1912
shell# openfoam-selector --register myfavourite \
- --source-dir /usr/local/openfoam-1806 --yes
+ --source-dir /usr/local/openfoam1912 --yes
myfavourite is already registered.
Overwriting previously registered files.
shell# openfoam-selector --list
@@ -420,14 +420,16 @@ shell startup files.
=head1 AUTHOR
-Written by Jeff Squyres.
+Written by Jeff Squyres. OPENFOAM modifications by Mark Olesen.
=head1 REPORTING BUGS
-Send bug reports to the OpenFabrics general mailing list (see
-L). This is a high-volume mailing list,
-so be sure to put "openfoam-selector" in the subject to ensure that it is
-not missed.
+Presumably not many bugs left.
+Report any issues on the regular OPENFOAM channel:
+L or
+L
+
+openfoam-selector.in
=head1 COPYRIGHT
@@ -437,7 +439,7 @@ This is free software; see the source for copying conditions. There
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
-Copyright (C) 2018 OpenCFD Ltd.
+Copyright (C) 2018-2020 OpenCFD Ltd.
=cut
@@ -663,7 +665,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Jeff Squyres.
-Changes Copyright (C) 2018 OpenCFD Ltd.\n"
+Changes Copyright (C) 2018-2020 OpenCFD Ltd.\n"
if (!$silent);
exit(0);
}