]> git.pld-linux.org Git - projects/setup.git/commitdiff
- more generic check of parameters to be exported
authorTomasz Pala <gotar@pld-linux.org>
Thu, 24 Feb 2011 23:07:56 +0000 (23:07 +0000)
committerTomasz Pala <gotar@pld-linux.org>
Thu, 24 Feb 2011 23:07:56 +0000 (23:07 +0000)
Changed files:
    etc/profile -> 1.57

etc/profile

index 00c85dcaa58f8ce6238c63658fde6e2e612cf4f2..219644eb8754789db41971216f5ffc3899113130 100644 (file)
@@ -128,18 +128,7 @@ else
                                ;;
                        * )
                                if [ -r "$i" ]; then
-                                       . "$i"
-                                       # export VAR will set and export VAR
-                                       # if it didn't exist before. Other shells
-                                       # (ksh, bash) behave differently.
-                                       if [ -n "$ZSH_VERSION" ]; then
-                                               # zsh specific
-                                               if [ "${(P)+NAME}" = "1" ]; then
-                                                       export "$NAME"
-                                               fi
-                                       else
-                                               export "$NAME"
-                                       fi
+                                       . "$i"; eval [ '"${'"$NAME"'+X}"' = 'X' ] && export $NAME
                                fi
                                ;;
                esac
This page took 0.087257 seconds and 4 git commands to generate.