Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.