setup: etc/profile - more generic check of parameters to be exported

gotar gotar at pld-linux.org
Fri Feb 25 00:08:01 CET 2011


Author: gotar                        Date: Thu Feb 24 23:08:01 2011 GMT
Module: setup                         Tag: HEAD
---- Log message:
- more generic check of parameters to be exported

---- Files affected:
setup/etc:
   profile (1.56 -> 1.57) 

---- Diffs:

================================================================
Index: setup/etc/profile
diff -u setup/etc/profile:1.56 setup/etc/profile:1.57
--- setup/etc/profile:1.56	Thu Feb 24 20:17:44 2011
+++ setup/etc/profile	Fri Feb 25 00:07:56 2011
@@ -128,18 +128,7 @@
 				;;
 			* )
 				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
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/setup/etc/profile?r1=1.56&r2=1.57&f=u



More information about the pld-cvs-commit mailing list