]> arthur.barton.de Git - ConfigScripts.git/commitdiff
Unset temporary/local variables
authorAlexander Barton <alex@barton.de>
Fri, 18 Apr 2014 12:50:19 +0000 (14:50 +0200)
committerAlexander Barton <alex@barton.de>
Fri, 18 Apr 2014 12:50:19 +0000 (14:50 +0200)
sys/profile

index 2e4f778542a814156d22469bb080eb3eeba9860f..01251efa136f25683d0b3b3dce6491651d8dbaba 100644 (file)
@@ -51,21 +51,22 @@ else
        export PATH
 fi
 # prepend optional directories to PATH ...
-path=""
+unset path
 for d in /Developer/usr/bin /usr/pkg/bin /usr/ucb /usr/lib/ccache /opt/*/bin; do
        if [ -d "$d" -o -h "$d" ]; then
                [ -e "$d/.not_in_path" ] || path="$path$d:"
        fi
 done
 [ -n "$path" ] && PATH="$path$PATH"
+unset path
 if [ "$LOGNAME" = "root" ]; then
-       path=""
        for d in /usr/pkg/sbin /opt/*/sbin; do
                if [ -d "$d" -o -h "$d" ]; then
                        [ -e "$d/.not_in_path" ] || path="$path$d:"
                fi
        done
        [ -n "$path" ] && PATH="$path$PATH"
+       unset path
 fi
 # append optional directories to PATH ...
 for d in /usr/bin/X11 /usr/games /usr/share/php/bin; do
@@ -73,6 +74,7 @@ for d in /usr/bin/X11 /usr/games /usr/share/php/bin; do
                [ -e "$d/.not_in_path" ] || PATH="$PATH:$d"
        fi
 done
+unset d
 # set PATH so it includes user's private executables
 [ -d ~/Applications -a ! -e ~/Applications/.not_in_path ] \
        && PATH=~/Applications:"${PATH}"
@@ -92,6 +94,7 @@ if [ ! "$(type manpath 2>/dev/null)" ]; then
        [ -n "$path" ] && MANPATH="$path$MANPATH"
        [ -d ~/share/man ] && MANPATH=~/share/man:"${MANPATH}"
        [ -d ~/man ] && MANPATH=~/man:"${MANPATH}"
+       unset path d
 fi
 
 # set variable identifying the chroot you work in
@@ -122,6 +125,7 @@ if [ -d /etc/profile.d -o -d /usr/local/etc/profile.d ]; then
                                . "$f"
                esac
        done
+       unset f
 fi
 
 # read local profile, if available