bug fix
[distro-setup] / path_add-function
similarity index 86%
rename from path-add-function
rename to path_add-function
index ec41e06acb8f21ac4f05a5297765df6bcdc7d7dc..cc613672b9790c7049eefbac6f837bbfe521b8b0 100644 (file)
@@ -2,10 +2,11 @@
 # no bashisms so it can be used in debian profile run by dash
 # --start adds to start of path, which will give it highest priority
 # --ifexists will add to path only if the directory exists
-path-add() {
+path_add() {
     local found x y z
-    local ifexists=false
-    local start=false
+    local ifexists start
+    ifexists=false
+    start=false
     while [ "$1" = --* ]; do
         if [ "$1" = --start ]; then
             start=true
@@ -22,7 +23,7 @@ path-add() {
         done
         unset IFS
         if ! $found; then
-            if [ $ifexists = false ]  || [ -d $x ]; then
+            if ! $ifexists || [ -d $x ]; then
                 if $start; then
                     PATH="$x:$PATH"
                 else