Browse code

fix for linux

Nat! authored on 15/10/2016 14:44:27
Showing 3 changed files
... ...
@@ -1,3 +1,8 @@
1
+2.2.1
2
+===
3
+
4
+* fix for Linux
5
+
1 6
 2.2
2 7
 ===
3 8
 
... ...
@@ -29,7 +29,7 @@
29 29
 #   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 30
 #   POSSIBILITY OF SUCH DAMAGE.
31 31
 
32
-MULLE_BOOTSTRAP_VERSION="2.2"
32
+MULLE_BOOTSTRAP_VERSION="2.2.1"
33 33
 
34 34
 #
35 35
 # This is the main user interface to mulle-bootstrap
... ...
@@ -671,23 +671,23 @@ escaped_spaces()
671 671
 combined_escaped_search_path()
672 672
 {
673 673
    local i
674
-   local path
674
+   local combinedpath
675 675
 
676 676
    for i in "$@"
677 677
    do
678
-      if [ ! -z "$i" ]
678
+      if [ ! -z "${i}" ]
679 679
       then
680
-         i="`escaped_spaces "$i"`"
681
-         if [ -z "$path" ]
680
+         i="`escaped_spaces "${i}"`"
681
+         if [ -z "$combinedpath" ]
682 682
          then
683
-            path="$i"
683
+            combinedpath="${i}"
684 684
          else
685
-            path="$path $i"
685
+            combinedpath="${combinedpath} ${i}"
686 686
          fi
687 687
       fi
688 688
    done
689 689
 
690
-   echo "${path}"
690
+   echo "${combinedpath}"
691 691
 }
692 692
 
693 693
 
... ...
@@ -750,22 +750,22 @@ _path_from_components()
750 750
    components="$1"
751 751
 
752 752
    local i
753
-   local path
753
+   local composedpath  # renamed this from path, fixes crazy bug on linux
754 754
 
755 755
    IFS="
756 756
 "
757 757
    for i in $components
758 758
    do
759
-      path="${path}${i}"
759
+      composedpath="${composedpath}${i}"
760 760
    done
761 761
 
762 762
    IFS="${DEFAULT_IFS}"
763 763
 
764
-   if [ -z "${path}" ]
764
+   if [ -z "${composedpath}" ]
765 765
    then
766 766
       echo "."
767 767
    else
768
-      echo "$path" | sed 's|^\(..*\)/$|\1|'
768
+      echo "${composedpath}" | sed 's|^\(..*\)/$|\1|'
769 769
    fi
770 770
 }
771 771
 
... ...
@@ -958,10 +958,10 @@ lso()
958 958
 #
959 959
 dir_has_files()
960 960
 {
961
-   local path
961
+   local dirpath
962 962
    local flag
963 963
 
964
-   path="$1"
964
+   dirpath="$1"
965 965
    shift
966 966
 
967 967
    case "$1" in
... ...
@@ -979,15 +979,15 @@ dir_has_files()
979 979
    local empty
980 980
    local result
981 981
 
982
-   empty="`find "${path}" -xdev -mindepth 1 -maxdepth 1 -name "[a-zA-Z0-9_-]*" ${flags} "$@" -print 2> /dev/null`"
982
+   empty="`find "${dirpath}" -xdev -mindepth 1 -maxdepth 1 -name "[a-zA-Z0-9_-]*" ${flags} "$@" -print 2> /dev/null`"
983 983
    [ "$empty" != "" ]
984 984
    result=$?
985 985
 
986 986
    if [ "$result" -eq 1 ]
987 987
    then
988
-      log_fluff "Directory \"$path\" has no files"
988
+      log_fluff "Directory \"$dirpath\" has no files"
989 989
    else
990
-      log_fluff "Directory \"$path\" has files"
990
+      log_fluff "Directory \"$dirpath\" has files"
991 991
    fi
992 992
    return "$result"
993 993
 }