Browse code

voodoo fix for linux

Nat! authored on 15-10-2016 13:38:16
Showing 1 changed files
... ...
@@ -694,8 +694,9 @@ combined_escaped_search_path()
694 694
 _simplify_components()
695 695
 {
696 696
    local i
697
-   local components
697
+   local result
698 698
 
699
+   result= # voodoo linux fix ?
699 700
    IFS="
700 701
 "
701 702
    for i in $*
... ...
@@ -709,13 +710,13 @@ _simplify_components()
709 710
 
710 711
          # bar/.. -> ""
711 712
          ../)
712
-            if [ -z "${components}" ]
713
+            if [ -z "${result}" ]
713 714
             then
714
-               components="`array_add "${components}" "../"`"
715
+               result="`array_add "${result}" "../"`"
715 716
             else
716
-               if [ "${components}" != "/" ]
717
+               if [ "${result}" != "/" ]
717 718
                then
718
-                  components="`array_remove_last "${components}"`"
719
+                  result="`array_remove_last "${result}"`"
719 720
                fi
720 721
                # /.. -> /
721 722
             fi
... ...
@@ -724,21 +725,21 @@ _simplify_components()
724 725
 
725 726
          # foo/ -> foo
726 727
          "/")
727
-            if [ -z "${components}" ]
728
+            if [ -z "${result}" ]
728 729
             then
729
-               components="${i}"
730
+               result="${i}"
730 731
             fi
731 732
          ;;
732 733
 
733 734
          *)
734
-            components="`array_add "${components}" "${i}"`"
735
+            result="`array_add "${result}" "${i}"`"
735 736
          ;;
736 737
       esac
737 738
    done
738 739
 
739 740
    IFS="${DEFAULT_IFS}"
740 741
 
741
-   echo "${components}"
742
+   echo "${result}"
742 743
 }
743 744
 
744 745
 
... ...
@@ -791,7 +792,7 @@ simplify_path()
791 792
    if [ ! -z "${path}" ]
792 793
    then
793 794
       components="`echo "${path}" | tr '/' '\012' | sed -e 's|$|/|'`"
794
-      final_components="`_simplify_components  "${components}"`"
795
+      final_components="`_simplify_components "${components}"`"
795 796
       final_path="`_path_from_components "${final_components}"`"
796 797
    fi
797 798