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$
Additional copyrights may follow
Copyright (C) 2018 OpenCFD Ltd.
Copyright (C) 2018-2020 OpenCFD Ltd.
$HEADER$
......
#! /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=<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\\"
......
# -*- 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=<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)
......
#!/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 @@
# ========= |
# \\ / 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
# <http://www.gnu.org/licenses/>.
# 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
......
#!/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<http://www.openfabrics.org/>). 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<https://develop.openfoam.com/Development/openfoam/-/issues/> or
L<https://develop.openfoam.com/Community/feature-scripts>
=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);
}
......
#!/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<next> 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<http://www.openfabrics.org/>). 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<https://develop.openfoam.com/Development/openfoam/-/issues/> or
L<https://develop.openfoam.com/Community/feature-scripts>
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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment