Skip to content

Commit

Permalink
Merge pull request #7 from AaltoScienceIT/manpath
Browse files Browse the repository at this point in the history
Check that the man command exists before using it
  • Loading branch information
VilleS1 authored Feb 28, 2019
2 parents 682fc33 + 96b300d commit 1df7d64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion files/fgi-manpath.csh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
if ! $?MANPATH then
setenv MANPATH
endif
setenv MANPATH "${MANPATH}:"`man -w`
if (`where man` != "") then
setenv MANPATH "${MANPATH}:"`man -w`
endif

4 changes: 3 additions & 1 deletion files/fgi-manpath.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# Set the manpath explicitly, so MANPATH overwrites won't hide system man pages

export MANPATH=$MANPATH:`man -w`
if mancmd=$(command -v man); then
export MANPATH=$MANPATH:$(${mancmd} -w)
fi

0 comments on commit 1df7d64

Please sign in to comment.