Browse code

Refresh clone cache by default. Use improved brew formula to specify dependencies we need at runtime, without hopefully actually needing to pull them. Relax, slow down take it easy and stay bash 2.1 compatible by removing <<< for Linux.

Nat! authored on 31-03-2017 19:30:58
Showing 10 changed files
... ...
@@ -52,6 +52,13 @@ class ${PROJECT} < Formula
52 52
   version "${VERSION}"
53 53
   sha256 "${HASH}"
54 54
 
55
+  depends_on :git  => :run
56
+  depends_on :curl => :run
57
+  depends_on :bash => :run
58
+
59
+# we can live w/o cmake though
60
+  depends_on :cmake => :run
61
+
55 62
   def install
56 63
      system "./install.sh", "#{prefix}"
57 64
   end
... ...
@@ -57,7 +57,7 @@ devbranch="`git rev-parse --abbrev-ref HEAD`"
57 57
 (
58 58
 	cd ../homebrew-$TAP ; \
59 59
    git add mulle-bootstrap.rb ; \
60
- 	git commit -m "${TAG} release of mulle-bootstrap" mulle-bootstrap.rb ; \
60
+ 	git commit -m "${TAG} ${BRANCH} of mulle-bootstrap" mulle-bootstrap.rb ; \
61 61
  	git push origin master
62 62
 )
63 63
 
... ...
@@ -30,7 +30,7 @@
30 30
 #   POSSIBILITY OF SUCH DAMAGE.
31 31
 MULLE_EXECUTABLE_VERSION_MAJOR=3
32 32
 MULLE_EXECUTABLE_VERSION_MINOR=1
33
-MULLE_EXECUTABLE_VERSION_PATCH=0
33
+MULLE_EXECUTABLE_VERSION_PATCH=1
34 34
 
35 35
 MULLE_EXECUTABLE_VERSION="${MULLE_EXECUTABLE_VERSION_MAJOR}.${MULLE_EXECUTABLE_VERSION_MINOR}.${MULLE_EXECUTABLE_VERSION_PATCH}"
36 36
 
... ...
@@ -30,7 +30,7 @@
30 30
 #   POSSIBILITY OF SUCH DAMAGE.
31 31
 MULLE_EXECUTABLE_VERSION_MAJOR=3
32 32
 MULLE_EXECUTABLE_VERSION_MINOR=1
33
-MULLE_EXECUTABLE_VERSION_PATCH=0
33
+MULLE_EXECUTABLE_VERSION_PATCH=1
34 34
 
35 35
 MULLE_EXECUTABLE_VERSION="${MULLE_EXECUTABLE_VERSION_MAJOR}.${MULLE_EXECUTABLE_VERSION_MINOR}.${MULLE_EXECUTABLE_VERSION_PATCH}"
36 36
 
... ...
@@ -107,7 +107,7 @@ array_get()
107 107
 #   [ "$i" -ge "$n" ] && internal_fail "index ${i} out of bounds ${n}"
108 108
 
109 109
    ((i++))
110
-   sed -n "${i}p" <<< "${array}"
110
+   echo "${array}" | sed -n "${i}p"
111 111
 }
112 112
 
113 113
 
... ...
@@ -115,7 +115,7 @@ array_get_last()
115 115
 {
116 116
    local array="$1"
117 117
 
118
-   tail -1 <<< "${array}"
118
+   echo "${array}" | tail -1
119 119
 }
120 120
 
121 121
 
... ...
@@ -143,14 +143,14 @@ array_insert()
143 143
 
144 144
    if [ "${head_count}" -ne 0 ]
145 145
    then
146
-      head "-${head_count}" <<< "${array}"
146
+      echo "${array}" | head "-${head_count}"
147 147
    fi
148 148
 
149 149
    echo "${value}"
150 150
 
151 151
    if [ "${tail_count}" -ne 0 ]
152 152
    then
153
-      tail "-${tail_count}" <<< "${array}"
153
+      echo "${array}" | tail "-${tail_count}"
154 154
    fi
155 155
 }
156 156
 
... ...
@@ -165,7 +165,7 @@ array_remove()
165 165
 
166 166
    if [ ! -z "${array}" ]
167 167
    then
168
-       fgrep -v -x "${value}" <<< "${array}"
168
+       echo "${array}" | fgrep -v -x "${value}"
169 169
    fi
170 170
 }
171 171
 
... ...
@@ -269,7 +269,7 @@ _assoc_array_remove()
269 269
    then
270 270
 # DEBUG code
271 271
 #       key="`_assoc_array_key_check "${key}"`"
272
-      grep -v "^${key}=" <<< "${array}"
272
+      echo "${array}" | grep -v "^${key}="
273 273
    fi
274 274
 }
275 275
 
... ...
@@ -282,7 +282,8 @@ assoc_array_get()
282 282
 # DEBUG code
283 283
 #   key="`_assoc_array_key_check "${key}"`"
284 284
 
285
-   grep "^${key}=" <<< "${array}" \
285
+   echo "${array}" \
286
+      | grep "^${key}="  \
286 287
       | sed -n 's/^[^=]*=\(.*\)$/\1/p'
287 288
 }
288 289
 
... ...
@@ -291,7 +292,8 @@ assoc_array_get_last()
291 292
 {
292 293
    local array="$1"
293 294
 
294
-   tail -1 <<< "${array}" \
295
+   echo "${array}" \
296
+      | tail -1  \
295 297
       | sed -n 's/^[^=]*=\(.*\)$/\1/p'
296 298
 }
297 299
 
... ...
@@ -300,7 +302,7 @@ assoc_array_all_keys()
300 302
 {
301 303
    local array="$1"
302 304
 
303
-   sed -n 's/^\([^=]*\)=.*$/\1/p' <<< "${array}"
305
+   echo "${array}" | sed -n 's/^\([^=]*\)=.*$/\1/p'
304 306
 }
305 307
 
306 308
 
... ...
@@ -308,7 +310,7 @@ assoc_array_all_values()
308 310
 {
309 311
    local array="$1"
310 312
 
311
-   sed -n 's/^[^=]*=\(.*\)$/\1/p' <<< "${array}"
313
+   echo "${array}" | sed -n 's/^[^=]*=\(.*\)$/\1/p'
312 314
 }
313 315
 
314 316
 
... ...
@@ -759,7 +759,7 @@ _build_flags()
759 759
       for path in ${native_includelines}
760 760
       do
761 761
          IFS="${DEFAULT_IFS}"
762
-         path="$(sed 's/ /\\ /g' <<< "${path}")"
762
+         path="`echo "${path}" | sed 's/ /\\ /g'`"
763 763
          cppflags="`concat "${other_cflags}" "${includeprefix}${path}"`"
764 764
       done
765 765
 
... ...
@@ -767,7 +767,7 @@ _build_flags()
767 767
       for path in ${native_librarylines}
768 768
       do
769 769
          IFS="${DEFAULT_IFS}"
770
-         path="$(sed 's/ /\\ /g' <<< "${path}")"
770
+         path="`echo "${path}" | sed 's/ /\\ /g'`"
771 771
          ldflags="`concat "${other_ldflags}" "${libraryprefix}${path}"`"
772 772
       done
773 773
 
... ...
@@ -775,7 +775,7 @@ _build_flags()
775 775
       for path in ${native_frameworklines}
776 776
       do
777 777
          IFS="${DEFAULT_IFS}"
778
-         path="$(sed 's/ /\\ /g' <<< "${path}")"
778
+         path="`echo "${path}" | sed 's/ /\\ /g'`"
779 779
          other_cppflags="`concat "${other_cflags}" "${frameworkprefix}${path}"`"
780 780
          ldflags="`concat "${other_ldflags}" "${frameworkprefix}${path}"`"
781 781
       done
... ...
@@ -852,8 +852,8 @@ _simplified_path()
852 852
 
853 853
            if [ ! -z "${last}" -a "${last}" != ".." ]
854 854
            then
855
-              result="$(sed '$d' <<< "${result}")"
856
-              last="$(sed -n '$p' <<< "${result}")"
855
+              result="`echo "${result}" | sed '$d'`"
856
+              last="`echo "${result}" | sed -n '$p'`"
857 857
               continue
858 858
            fi
859 859
          ;;
... ...
@@ -173,7 +173,7 @@ master_remove_minion_bootstrap_project()
173 173
    local filepath
174 174
 
175 175
    minionpath="`symlink_relpath "${minionpath}" "${masterpath}"`"
176
-   unregex="`sed -e 's/[]\/()$*.^|[]/\\&/g' <<< "${minionpath}"`"
176
+   unregex="`echo "${minionpath}" | sed -e 's/[]\/()$*.^|[]/\\&/g'`"
177 177
    filepath="${masterpath}/${BOOTSTRAP_DIR}.local/minions"
178 178
 
179 179
    if [ -f "${filepath}" ]
... ...
@@ -818,7 +818,7 @@ parse_raw_clone()
818 818
 
819 819
    [ -z "${clone}" ] && internal_fail "parse_raw_clone: clone is empty"
820 820
 
821
-   IFS=";" read -r url dstdir branch scm tag <<< "${clone}"
821
+   echo "${clone}" | IFS=";" read -r url dstdir branch scm tag
822 822
 }
823 823
 
824 824
 
... ...
@@ -232,6 +232,21 @@ _git_clone()
232 232
                   log_error "git clone of \"${url}\" into \"${cachedir}\" failed"
233 233
                   return 1
234 234
                fi
235
+            else
236
+               # refetch (this shjoz)
237
+               local refresh_cache
238
+
239
+               refresh_cache="`read_config_setting "refresh_cache" "YES"`"
240
+               if [ "${refresh_cache}" = "YES" ]
241
+               then
242
+               (
243
+                  cd "${cachedir}";
244
+                  if ! exekutor git ${GITFLAGS} fetch --tags >&2
245
+                  then
246
+                     log_warning "git fetch from \"${url}\" failed, using old state"
247
+                  fi
248
+               )
249
+               fi
235 250
             fi
236 251
             url="${cachedir}"
237 252
          fi