Vim 5 compatibility.
[profile.git] / .profile.d / PATH.bashrc
index 66cd709..3113f75 100644 (file)
@@ -1,11 +1,9 @@
-# $Id$
-#
 # Path information is stored on separate lines in XXXdirs.
 # We extract each directory exists and add it to the appropriate PATH.
 #
 
 # Location of the XXXdirs files.
-DIR=$HOME/.profile.d
+DIR="$HOME/.profile.d"
 
 # Set one path to be the same as another.
 function copypath() {
@@ -14,7 +12,7 @@ function copypath() {
 
   # Sanitise and export.
   path="$(eval echo \$$oldpath)"
-  [ -z "$path" ] || eval export $newpath="$path"
+  [ -z "$path" ] || eval "export $newpath='$path'"
 
   unset path newpath oldpath
 }
@@ -50,7 +48,7 @@ function makepath() {
   [ -z "$path" ] && return
 
   # Export.
-  eval export $newpath="$path"
+  eval "export $newpath='$path'"
 
   unset path newpath dirs
 }