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 709
 
710 710
          # bar/.. -> ""
711 711
          ../)
712
-            if [ -z "${components}" ]
712
+            if [ -z "${result}" ]
713 713
             then
714
-               components="`array_add "${components}" "../"`"
714
+               result="`array_add "${result}" "../"`"
715 715
             else
716
-               if [ "${components}" != "/" ]
716
+               if [ "${result}" != "/" ]
717 717
                then
718
-                  components="`array_remove_last "${components}"`"
718
+                  result="`array_remove_last "${result}"`"
719 719
                fi
720 720
                # /.. -> /
721 721
             fi
... ...
@@ -724,21 +725,21 @@ _simplify_components()
724 724
 
725 725
          # foo/ -> foo
726 726
          "/")
727
-            if [ -z "${components}" ]
727
+            if [ -z "${result}" ]
728 728
             then
729
-               components="${i}"
729
+               result="${i}"
730 730
             fi
731 731
          ;;
732 732
 
733 733
          *)
734
-            components="`array_add "${components}" "${i}"`"
734
+            result="`array_add "${result}" "${i}"`"
735 735
          ;;
736 736
       esac
737 737
    done
738 738
 
739 739
    IFS="${DEFAULT_IFS}"
740 740
 
741
-   echo "${components}"
741
+   echo "${result}"
742 742
 }
743 743
 
744 744
 
... ...
@@ -791,7 +792,7 @@ simplify_path()
791 791
    if [ ! -z "${path}" ]
792 792
    then
793 793
       components="`echo "${path}" | tr '/' '\012' | sed -e 's|$|/|'`"
794
-      final_components="`_simplify_components  "${components}"`"
794
+      final_components="`_simplify_components "${components}"`"
795 795
       final_path="`_path_from_components "${final_components}"`"
796 796
    fi
797 797