|
From: Jeff S. <jsq...@us...> - 2005-03-14 23:22:42
|
Update of /cvsroot/env-switcher/default-manpath/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16432/src Modified Files: default-manpath.tcl Log Message: Update -- if there is no /etc/man.config, don't try to open it. Index: default-manpath.tcl =================================================================== RCS file: /cvsroot/env-switcher/default-manpath/src/default-manpath.tcl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** default-manpath.tcl 28 Feb 2005 23:15:34 -0000 1.1 --- default-manpath.tcl 14 Mar 2005 23:22:29 -0000 1.2 *************** *** 25,32 **** # Read in /etc/man.config, find all MANPATH entires ! set manconfig [open "|egrep ^MANPATH /etc/man.config" "r"] ! while { [eof $manconfig] == 0 } { gets $manconfig line ! set words [split $line] # To be blunt, I didn't have the time or inclination to figure out the --- 25,33 ---- # Read in /etc/man.config, find all MANPATH entires ! if { [file exists /etc/man.config] } { ! set manconfig [open "|egrep ^MANPATH /etc/man.config" "r"] ! while { [eof $manconfig] == 0 } { gets $manconfig line ! set words [split $line] # To be blunt, I didn't have the time or inclination to figure out the *************** *** 37,43 **** # MANPATH, and not anything else. ! if { [lindex $words 0] == "MANPATH" } { ! append-path MANPATH [lindex $words 1] } } - close $manconfig --- 38,45 ---- # MANPATH, and not anything else. ! if { [lindex $words 0] == "MANPATH" } { ! append-path MANPATH [lindex $words 1] ! } } + close $manconfig } |