Browse code

* fix a problem with zip archives tests

Nat! authored on 04-09-2017 11:27:03
Showing 4 changed files
... ...
@@ -41,7 +41,7 @@ mulle-mingw-dumpdef.sh*
41 41
 )
42 42
 
43 43
 #
44
-# Todo need to preprocess this to replace SH_PATH with /usr/bin/sh.exe or some such
44
+# Todo need to preprocess this to replace paths
45 45
 #
46 46
    set( BATS
47 47
 mulle-mingw-dumpdef.bat
... ...
@@ -1,3 +1,9 @@
1
+### 3.11.1
2
+
3
+* fixes for mingw
4
+* fix a problem with zip archives tests
5
+
6
+
1 7
 ## 3.11.0
2 8
 
3 9
 Clean command reworked
... ...
@@ -31,7 +31,7 @@
31 31
 #
32 32
 MULLE_EXECUTABLE_VERSION_MAJOR=3
33 33
 MULLE_EXECUTABLE_VERSION_MINOR=11
34
-MULLE_EXECUTABLE_VERSION_PATCH=0
34
+MULLE_EXECUTABLE_VERSION_PATCH=1
35 35
 
36 36
 MULLE_EXECUTABLE_VERSION="${MULLE_EXECUTABLE_VERSION_MAJOR}.${MULLE_EXECUTABLE_VERSION_MINOR}.${MULLE_EXECUTABLE_VERSION_PATCH}"
37 37
 
... ...
@@ -702,14 +702,23 @@ git_main()
702 702
 
703 703
 _archive_test()
704 704
 {
705
+   log_debug "_archive_test" "$@"
706
+
705 707
    local archive="$1"
708
+   local scm="$2"
706 709
 
707 710
    log_fluff "Testing ${C_MAGENTA}${C_BOLD}${archive}${C_INFO} ..."
708 711
 
709 712
    case "${archive}" in
710 713
       *.zip)
711 714
          redirect_exekutor /dev/null unzip -t "${archive}" || return 1
712
-	 archive="${archive%.*}"
715
+	      archive="${archive%.*}"
716
+      ;;
717
+   esac
718
+
719
+   case "${scm}" in
720
+      zip*)
721
+         return
713 722
       ;;
714 723
    esac
715 724
 
... ...
@@ -753,7 +762,7 @@ _archive_unpack()
753 762
    case "${archive}" in
754 763
       *.zip)
755 764
          exekutor unzip "${archive}" || return 1
756
-	 archive="${archive%.*}"
765
+	      archive="${archive%.*}"
757 766
       ;;
758 767
    esac
759 768
 
... ...
@@ -789,13 +798,15 @@ _archive_unpack()
789 798
 
790 799
 _validate_download()
791 800
 {
801
+   log_debug "_validate_download" "$@"
802
+
792 803
    local filename="$1"
793 804
    local scm="$2"
794 805
 
795 806
    local checksum
796 807
    local expected
797 808
 
798
-   if ! _archive_test "${filename}"
809
+   if ! _archive_test "${filename}" "${scm}"
799 810
    then
800 811
       return 1
801 812
    fi
... ...
@@ -968,6 +979,8 @@ _tar_download()
968 979
 
969 980
 tar_unpack()
970 981
 {
982
+   log_debug "tar_unpack" "$@"
983
+
971 984
    [ $# -ge 7 ] || internal_fail "tar_unpack: parameters missing"
972 985
 
973 986
 #   local reposdir="$1"
... ...
@@ -1014,6 +1027,8 @@ tar_unpack()
1014 1027
 
1015 1028
 zip_unpack()
1016 1029
 {
1030
+   log_debug "zip_unpack" "$@"
1031
+
1017 1032
    [ $# -ge 7 ] || internal_fail "zip_unpack: parameters missing"
1018 1033
 
1019 1034
 #   local reposdir="$1"