Skip to content

Instantly share code, notes, and snippets.

@czi
Created August 25, 2012 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save czi/3459051 to your computer and use it in GitHub Desktop.
Save czi/3459051 to your computer and use it in GitHub Desktop.
perlbrew bashrc centos manpath fix (-q not valid)
*** bashrc.orig 2012-08-24 21:19:36.492160130 -0500
--- bashrc 2012-08-24 21:28:29.826663945 -0500
***************
*** 16,22 ****
--- 16,28 ----
}
__perlbrew_set_path () {
+ if [[ -f /etc/centos-release ]] || [[ $(grep CentOS /etc/redhat-release) ]];
+ then
+ export MANPATH_WITHOUT_PERLBREW=`perl -e 'print join ":", grep { index($_, $ENV{PERLBREW_ROOT}) } split/:/,qx(manpath);'`
+ else
export MANPATH_WITHOUT_PERLBREW=`perl -e 'print join ":", grep { index($_, $ENV{PERLBREW_ROOT}) } split/:/,qx(manpath -q);'`
+ fi
+
if [ -n "$PERLBREW_MANPATH" ]; then
export MANPATH="$PERLBREW_MANPATH:$MANPATH_WITHOUT_PERLBREW"
else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment