[90601] trunk/base/setupenv.bash.in

cal at macports.org cal at macports.org
Fri Mar 9 11:48:38 PST 2012


Revision: 90601
          http://trac.macports.org/changeset/90601
Author:   cal at macports.org
Date:     2012-03-09 11:48:38 -0800 (Fri, 09 Mar 2012)
Log Message:
-----------
setupenv.bash.in: Declare variables as local where possible, #30584

Modified Paths:
--------------
    trunk/base/setupenv.bash.in

Modified: trunk/base/setupenv.bash.in
===================================================================
--- trunk/base/setupenv.bash.in	2012-03-09 19:14:12 UTC (rev 90600)
+++ trunk/base/setupenv.bash.in	2012-03-09 19:48:38 UTC (rev 90601)
@@ -34,6 +34,8 @@
     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_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=""
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120309/389b919d/attachment.html>


More information about the macports-changes mailing list