You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
setupenv.bash.in: Declare variables as local where possible, https://trac.macports.org/ticket/30584
git-svn-id: https://svn.macports.org/repository/macports/trunk/base@90601 d073be05-634f-4543-b044-5fe20cf6d1d6
This commit is contained in:
+5
-2
@@ -34,6 +34,8 @@ function export_path() {
|
||||
local sbinpath="@prefix_expanded@/sbin"
|
||||
|
||||
local IFS=":"
|
||||
local p
|
||||
|
||||
for p in $PATH; do
|
||||
if [ "$p" == "$binpath" ]; then
|
||||
binpath=""
|
||||
@@ -54,13 +56,14 @@ function export_path() {
|
||||
}
|
||||
|
||||
function export_manpath() {
|
||||
mpath="@prefix_expanded@/share/man"
|
||||
local mpath="@prefix_expanded@/share/man"
|
||||
local IFS=":"
|
||||
local p
|
||||
|
||||
if [ -z "$MANPATH" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
local IFS=":"
|
||||
for p in $MANPATH; do
|
||||
if [ "$p" == "$mpath" ]; then
|
||||
mpath=""
|
||||
|
||||
Reference in New Issue
Block a user