Author: justi9
Date: 2007-10-30 16:54:29 -0400 (Tue, 30 Oct 2007)
New Revision: 1186
Modified:
mgmt/etc/devel.profile
Log:
Makes sourcing etc/devel.profile idempotent again. Restores
$DEVEL_HOME/bin to the default devel path.
Modified: mgmt/etc/devel.profile
===================================================================
--- mgmt/etc/devel.profile 2007-10-30 20:46:41 UTC (rev 1185)
+++ mgmt/etc/devel.profile 2007-10-30 20:54:29 UTC (rev 1186)
@@ -4,19 +4,33 @@
export DEVEL_MODULES="mint cumin"
-export DEVEL_ORIGINAL_PYTHONPATH="$PYTHONPATH"
-PYTHONPATH="$DEVEL_HOME"/lib/python:"$HOME"/lib/python:"$DEVEL_ORIGINAL_PYTHONPATH"
+# PYTHONPATH
+
+if test -z "$DEVEL_ORIGINAL_PYTHONPATH"; then
+ export DEVEL_ORIGINAL_PYTHONPATH="$PYTHONPATH"
+fi
+
+pypath="$DEVEL_HOME"/lib/python:"$HOME"/lib/python:"$DEVEL_ORIGINAL_PYTHONPATH"
+
for module in $DEVEL_MODULES; do
-
PYTHONPATH="$DEVEL_HOME"/"$module"/python:"$PYTHONPATH"
+ pypath="$DEVEL_HOME"/"$module"/python:"$pypath"
done
+
export PYTHONPATH
-export DEVEL_ORIGINAL_PATH="$PATH"
-PATH="$DEVEL_ORIGINAL_PATH"
+# PATH
+
+if test -z "$DEVEL_ORIGINAL_PATH"; then
+ export DEVEL_ORIGINAL_PATH="$PATH"
+fi
+
+path="$DEVEL_HOME"/bin:"$DEVEL_ORIGINAL_PATH"
+
for module in $DEVEL_MODULES; do
- PATH="$DEVEL_HOME"/"$module"/bin:"$PATH"
+ path="$DEVEL_HOME"/"$module"/bin:"$path"
done
-export PATH
+export PATH="$path"
+
# cumin test instance
export CUMIN_HOME="$DEVEL_HOME"/cumin-test-0