From 98b59141983e1371f5a127ca47d6d1a7ed3b0b08 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Wed, 21 Nov 2018 11:07:40 +0100
Subject: [PATCH] CONFIG: adjust MANPATH if an OpenFOAM doc/man1 directory
 exists

---
 etc/bashrc | 5 +++++
 etc/cshrc  | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/etc/bashrc b/etc/bashrc
index 7340532d7e4..43f628bb129 100644
--- a/etc/bashrc
+++ b/etc/bashrc
@@ -180,6 +180,11 @@ _foamEtc -config  CGAL
 _foamEtc -config  scotch
 _foamEtc -config  FFTW
 
+if [ -d "$WM_PROJECT_DIR/doc/man1" ]
+then
+    _foamAddMan "$WM_PROJECT_DIR/doc"
+fi
+
 # Interactive shell
 if /usr/bin/tty -s 2>/dev/null
 then
diff --git a/etc/cshrc b/etc/cshrc
index 165a8a5e2f1..819068b6e03 100644
--- a/etc/cshrc
+++ b/etc/cshrc
@@ -216,6 +216,10 @@ _foamEtc -config  ensight
 _foamEtc -config  CGAL
 _foamEtc -config  FFTW
 
+if ( -d "$WM_PROJECT_DIR/doc/man1" ) then
+    _foamAddMan "$WM_PROJECT_DIR/doc"
+endif
+
 # Interactive shell
 if ($?prompt) then
     _foamEtc -config  aliases
-- 
GitLab