From f80fc53b0c8da170390ea4eb7e7aabf7e145224a Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Fri, 9 Mar 2012 19:48:38 +0000 Subject: [PATCH] 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 --- setupenv.bash.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setupenv.bash.in b/setupenv.bash.in index 89d0dafee..8f10b8fe6 100644 --- a/setupenv.bash.in +++ b/setupenv.bash.in @@ -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=""