From 7c70919cfe8a0420e217653f5a341d255f8e80df Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Mon, 1 Mar 2010 11:01:09 +0100
Subject: [PATCH] BUG: apps/ensight/cshrc had bad CEI_ARCH for 32bit version

ENH: upgrade to env. variable to ensight9 (current version)
---
 etc/apps/ensight/bashrc | 10 +++++-----
 etc/apps/ensight/cshrc  | 17 +++++++++--------
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/etc/apps/ensight/bashrc b/etc/apps/ensight/bashrc
index 100f65ae5db..f47c0f6ca39 100644
--- a/etc/apps/ensight/bashrc
+++ b/etc/apps/ensight/bashrc
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+#   \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
 #    \\/     M anipulation  |
 #------------------------------------------------------------------------------
 # License
@@ -26,7 +26,7 @@
 #     ensight/bashrc
 #
 # Description
-#     Setup file for Ensight 8.?
+#     Setup file for Ensight
 #     Sourced from OpenFOAM-*/etc/bashrc
 #
 #------------------------------------------------------------------------------
@@ -40,7 +40,7 @@ fi
 if [ -r $CEI_HOME ]
 then
 
-    # special treatment for 32bit FOAM and 64bit Ensight
+    # special treatment for 32bit OpenFOAM and 64bit Ensight
     if [ "$WM_ARCH" = linux -a `uname -m` = x86_64 ]
     then
         export CEI_ARCH=linux_2.6_32
@@ -52,8 +52,8 @@ then
         export PATH=$CEI_HOME/bin:$PATH
     fi
 
-    export ENSIGHT8_INPUT=dummy
-    export ENSIGHT8_READER=$FOAM_LIBBIN
+    export ENSIGHT9_INPUT=dummy
+    export ENSIGHT9_READER=$FOAM_LIBBIN
 else
     unset CEI_HOME
 fi
diff --git a/etc/apps/ensight/cshrc b/etc/apps/ensight/cshrc
index ae7f3d60957..0126a8ea500 100644
--- a/etc/apps/ensight/cshrc
+++ b/etc/apps/ensight/cshrc
@@ -2,7 +2,7 @@
 # =========                 |
 # \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
 #  \\    /   O peration     |
-#   \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
+#   \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
 #    \\/     M anipulation  |
 #-------------------------------------------------------------------------------
 # License
@@ -26,7 +26,7 @@
 #     ensight/cshrc
 #
 # Description
-#     Setup file for Ensight 8.?
+#     Setup file for Ensight
 #     Sourced from OpenFOAM-*/etc/cshrc
 #
 #------------------------------------------------------------------------------
@@ -38,15 +38,16 @@ endif
 
 if ( -r $CEI_HOME ) then
 
-    # special treatment for 32bit FOAM and 64bit Ensight
-    if ($WM_ARCH == linux) then
-        setenv CEI_ARCH linux_linux_2.6_32
+    # special treatment for 32bit OpenFOAM and 64bit Ensight
+    if ($WM_ARCH == linux && `uname -m` == x86_64) then
+       setenv CEI_ARCH linux_2.6_32
     endif
 
-    set path=($path $CEI_HOME/bin)
+    # add to path
+    set path=($CEI_HOME/bin $path)
 
-    setenv ENSIGHT8_INPUT dummy
-    setenv ENSIGHT8_READER $FOAM_LIBBIN
+    setenv ENSIGHT9_INPUT dummy
+    setenv ENSIGHT9_READER $FOAM_LIBBIN
 else
     unsetenv CEI_HOME
 endif
-- 
GitLab