From e9eb24c0d8e53e339888bd65291f0f0c02758afa Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Mon, 3 Dec 2018 13:37:36 +0100
Subject: [PATCH] STYLE: update copyright information, README

---
 openfoam-selector/LICENSE                |  2 +
 openfoam-selector/Makefile.am            |  1 +
 openfoam-selector/Makefile.in            |  1 +
 openfoam-selector/README                 | 65 ++++++++++++------------
 openfoam-selector/configure              |  2 +-
 openfoam-selector/configure.ac           |  3 +-
 openfoam-selector/make_tgz               | 38 ++++++++++++++
 openfoam-selector/openfoam-selector-menu |  5 +-
 openfoam-selector/openfoam-selector.in   |  7 ++-
 9 files changed, 87 insertions(+), 37 deletions(-)
 create mode 100755 openfoam-selector/make_tgz

diff --git a/openfoam-selector/LICENSE b/openfoam-selector/LICENSE
index 084fba8..4f4d392 100644
--- a/openfoam-selector/LICENSE
+++ b/openfoam-selector/LICENSE
@@ -4,6 +4,8 @@ $COPYRIGHT$
 
 Additional copyrights may follow
 
+Copyright (C) 2018 OpenCFD Ltd.
+
 $HEADER$
 
 Redistribution and use in source and binary forms, with or without
diff --git a/openfoam-selector/Makefile.am b/openfoam-selector/Makefile.am
index b86c72d..4f693b5 100644
--- a/openfoam-selector/Makefile.am
+++ b/openfoam-selector/Makefile.am
@@ -1,4 +1,5 @@
 # Copyright (c) 2007 Cisco Systems, Inc.  All rights reserved.
+# Copyright (C) 2018 OpenCFD Ltd.
 
 EXTRA_DIST = README LICENSE
 
diff --git a/openfoam-selector/Makefile.in b/openfoam-selector/Makefile.in
index 48d8542..edadd39 100644
--- a/openfoam-selector/Makefile.in
+++ b/openfoam-selector/Makefile.in
@@ -15,6 +15,7 @@
 @SET_MAKE@
 
 # Copyright (c) 2007 Cisco Systems, Inc.  All rights reserved.
+# Copyright (C) 2018 OpenCFD Ltd.
 
 VPATH = @srcdir@
 am__is_gnu_make = { \
diff --git a/openfoam-selector/README b/openfoam-selector/README
index 805cb12..09ec6e6 100644
--- a/openfoam-selector/README
+++ b/openfoam-selector/README
@@ -1,30 +1,34 @@
 Copyright (c) 2007-2008 Cisco Systems, Inc.  All rights reserved.
+Copyright (C) 2018 OpenCFD Ltd.
+
+Preamble
+========
+
+The openfoam-selector an OpenFOAM-specific adaptation of the
+mpi-selector provided by Jeff Squyres and Cisco Systems.
 
 Overview
 ========
 
-mpi-selector is a simplistic tool that helps manage having multiple
-MPI implementations installed on a single host (or cluster).  It
-allows system administrators to set a site-wide default MPI
-implementation, but also allows users to selectively override that
-site-wide default with their own choice of MPI implementation.
+openfoam-selector is simple tool to help manage multiple OPENFOAM
+versions installed on a single host (or cluster).  It allows system
+administrators to set a site-wide default OPENFOAM version, but also
+allows users to selectively override that site-wide default with their
+own choice of OPENFOAM version.
 
 Both selections are optional and independent; system administrators
 may choose not to set a site-wide default while users do choose to
 their own default (and vice versa).
 
-Much more information is contained in the mpi-selector.1 man page.
+More information is contained in the openfoam-selector.1 man page.
 
 Installation
 ============
 
-mpi-selector is installed with the traditional "configure" / "make"
-combination common to many open source projects.
-
-A traditional "configure" script is provided to allow you where to
-install mpi-selector.  The main option that you'll want to use is
---prefix, specifying the top directory where mpi-selector and its
-files are installed.
+openfoam-selector is installed with a traditional "configure" / "make"
+combination common. The main option that you'll need for "configure"
+is the --prefix option, which specifies the top directory where
+openfoam-selector and its files are installed.
 
   shell$ ./configure --prefix=/where/to/install
 
@@ -35,15 +39,15 @@ installing into restricted directories):
 
 This command will install the following files:
 
-  $bindir/mpi-selector
+  $bindir/openfoam-selector
     --> $bindir defaults to "$prefix/bin", unless overridden on
         the "configure" command line
-  $mandir/man1/mpi-selector.1
+  $mandir/man1/openfoam-selector.1
     --> $mandir defaults to "$prefix/man", unless overridden on
         the "configure" command line
-  $pkgdatadir/mpi-selector.sh
-  $pkgdatadir/mpi-selector.csh
-    --> $pkgdatadir defaults to "$prefix/share/mpi-selector", unless
+  $pkgdatadir/openfoam-selector.sh
+  $pkgdatadir/openfoam-selector.csh
+    --> $pkgdatadir defaults to "$prefix/share/openfoam-selector", unless
         overridden on the "configure" command line (RPMs will
         typically change this value -- YMMV).
 
@@ -52,25 +56,22 @@ shell startup usage.  For example, on RedHat systems, they should be
 copied to /etc/profile.d so that all shells will execute them upon
 startup.
 
-These last two files will examine both the site-wide and per user MPI
-implementation selection, and if one is set, setup the shell's
+These last two files will examine both the site-wide and per user OPENFOAM
+version selection, and if one is set, setup the shell's
 environment for it.
 
+The shell version also provides an "openfoam_select" function that can
+be used directly from the user shell after changing versions and
+without logging out.
+
 Contact
 =======
 
-If you need assistance with the mpi-selector package, first read the
-mpi-selector(1) man page; it contains a lot more information than is
+If you need assistance with openfoam-selector, first read the
+openfoam-selector(1) man page; it contains more information than
 listed here.
 
-If that still does not answer your question, please send mail to the
-OpenFabrics general mailing list (see http://www.openfabrics.org/).
-This is a high-volume mailing list, so be sure to put "mpi-selector"
-in the subject line somewhere to help ensure that it won't be missed.
-
-Or feel free to contact me directly.
-
-Enjoy!
+If that still does not answer your question, please post a gitlab issue
+https://develop.openfoam.com/Community/feature-scripts
 
-- Jeff Squyres
-  14 Feb 2007
+2018-12-03 OpenCFD Ltd.
diff --git a/openfoam-selector/configure b/openfoam-selector/configure
index 26982db..2386fdd 100755
--- a/openfoam-selector/configure
+++ b/openfoam-selector/configure
@@ -2377,7 +2377,7 @@ OPENFOAM_SELECTOR_HOME_FILE=".openfoam-selector"
 prefix=$prefix_save
 
 # Information for the man page
-MAN_DATE=`date "+%B %d, %Y"`
+MAN_DATE=`date "+%Y-%m-%d"`
 
 
 # Party on
diff --git a/openfoam-selector/configure.ac b/openfoam-selector/configure.ac
index 32ada16..2e3bc86 100644
--- a/openfoam-selector/configure.ac
+++ b/openfoam-selector/configure.ac
@@ -1,5 +1,6 @@
 # -*- shell-script -*-
 # Copyright (c) 2007 Cisco Systems, Inc.  All rights reserved.
+# Copyright (C) 2018 OpenCFD Ltd.
 
 # Startup
 AC_INIT([openfoam-selector],
@@ -50,7 +51,7 @@ AC_SUBST(OPENFOAM_SELECTOR_HOME_FILE)
 prefix=$prefix_save
 
 # Information for the man page
-MAN_DATE=`date "+%B %d, %Y"`
+MAN_DATE=`date "+%Y-%m-%d"`
 AC_SUBST(MAN_DATE)
 
 # Party on
diff --git a/openfoam-selector/make_tgz b/openfoam-selector/make_tgz
new file mode 100755
index 0000000..3f8cb76
--- /dev/null
+++ b/openfoam-selector/make_tgz
@@ -0,0 +1,38 @@
+#!/bin/sh
+#------------------------------------------------------------------------------
+# =========                 |
+# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
+#  \\    /   O peration     |
+#   \\  /    A nd           | Copyright (C) 2018 OpenCFD Ltd.
+#    \\/     M anipulation  |
+#-------------------------------------------------------------------------------
+# License
+#     This file is part of OpenFOAM, licensed under GNU General Public License
+#     <http://www.gnu.org/licenses/>.
+#
+# Script
+#     makeTar
+#
+# Description
+#     Create tar.gz file from current HEAD
+#
+#-------------------------------------------------------------------------------
+cd "${0%/*}" || exit 1
+
+set -x
+
+VERSION="$(cat VERSION)"
+
+[ -n "$VERSION" ] || {
+    echo "No VERSION info"
+    exit 2
+}
+
+git archive \
+    --format=tgz \
+    --prefix="openfoam-selector-${VERSION}/" \
+    --output="openfoam-selector-${VERSION}.tgz" \
+    --verbose \
+    HEAD
+
+#-------------------------------------------------------------------------------
diff --git a/openfoam-selector/openfoam-selector-menu b/openfoam-selector/openfoam-selector-menu
index fa5119c..4fb58fb 100755
--- a/openfoam-selector/openfoam-selector-menu
+++ b/openfoam-selector/openfoam-selector-menu
@@ -1,6 +1,7 @@
 #!/usr/bin/perl
 #
 # Copyright (c) 2007 Cisco Systems, Inc.  All rights reserved.
+# Copyright (C) 2018 OpenCFD Ltd.
 #
 # Simple perl script to effect system-wide and per-user default
 # selections of which MPI implementation to use.
@@ -165,7 +166,9 @@ Copyright (c) 2007 Cisco Systems, Inc.  All rights reserved.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
-Written by Jeff Squyres.\n";
+Written by Jeff Squyres.
+
+Changes Copyright (C) 2018 OpenCFD Ltd.\n";
     exit(0);
 }
 
diff --git a/openfoam-selector/openfoam-selector.in b/openfoam-selector/openfoam-selector.in
index 496beb0..2fcecf6 100644
--- a/openfoam-selector/openfoam-selector.in
+++ b/openfoam-selector/openfoam-selector.in
@@ -1,6 +1,7 @@
 #!/usr/bin/perl
 #
 # Copyright (c) 2007 Cisco Systems, Inc.  All rights reserved.
+# Copyright (C) 2018 OpenCFD Ltd.
 #
 # Simple perl script to effect system-wide and per-user default
 # selections of which OPENFOAM to use.
@@ -437,7 +438,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 OpenCFD Ltd.
 
 =cut
 
@@ -661,7 +662,9 @@ Copyright (c) 2007 Cisco Systems, Inc.  All rights reserved.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
-Written by Jeff Squyres.\n"
+Written by Jeff Squyres.
+
+Changes Copyright (C) 2018 OpenCFD Ltd.\n"
       if (!$silent);
     exit(0);
 }
-- 
GitLab