Commit eb96f4b8 authored by Mark Olesen's avatar Mark Olesen

openfoam-selector : support debian config locations

- Debian does not have /etc/sysconf, so support alternative names
  with the -with-sysconf-dir configure option

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