瀏覽代碼

Update MKit to v0.0.39

Alois Mahdal 4 年之前
父節點
當前提交
f40b74432d
共有 3 個文件被更改,包括 30 次插入10 次删除
  1. 26
    7
      utils/mkit/include/build.sh
  2. 3
    2
      utils/mkit/include/release.sh
  3. 1
    1
      utils/mkit/include/vars.sh

+ 26
- 7
utils/mkit/include/build.sh 查看文件

161
     #
161
     #
162
     local file=$1
162
     local file=$1
163
     mkdir -p "$MKIT_LOCAL"
163
     mkdir -p "$MKIT_LOCAL"
164
-    echo "$file" >> "$MKIT_LOCAL/built.lst"
164
+    echo "1:$file" >> "$MKIT_LOCAL/built.lst"
165
 }
165
 }
166
 
166
 
167
 _mkit_data() {
167
 _mkit_data() {
212
     #
212
     #
213
     # Clean up tree after building
213
     # Clean up tree after building
214
     #
214
     #
215
-    test -f "$MKIT_LOCAL/built.lst" && {
216
-        <"$MKIT_LOCAL/built.lst" grep -v -e '\.\.' -e ^/ \
217
-          | xargs -r rm -rf
218
-        rm -f "$MKIT_LOCAL/built.lst"
219
-        rmdir --ignore-fail-on-non-empty "$MKIT_LOCAL"
220
-    }
215
+    local path
216
+    local line
217
+    local depth
218
+    test -f "$MKIT_LOCAL/built.lst" || return 0
219
+    {
220
+        cat "$MKIT_LOCAL/built.lst"
221
+        echo "1:$MKIT_LOCAL/built.lst"
222
+        echo "1:$MKIT_LOCAL"
223
+    } \
224
+      | grep -v -e '\.\.' -e ^/ -e '^~' \
225
+      | while IFS=: read -r depth path; do
226
+            test -e "$path" || continue
227
+            case $depth in
228
+                1)  warn "removing: $path"
229
+                    test -d "$path" \
230
+                     && rmdir -p --ignore-fail-on-non-empty "$path"
231
+                    test -f "$path" && rm "$path"
232
+                    ;;
233
+                r)  warn "removing recursively: $path"
234
+                    rm -r "$path"
235
+                    ;;
236
+                *)  warn "invalid built.lst format!"
237
+                    ;;
238
+            esac
239
+        done
221
     true
240
     true
222
 }
241
 }
223
 
242
 

+ 3
- 2
utils/mkit/include/release.sh 查看文件

154
     git add mkit.ini \
154
     git add mkit.ini \
155
       || die "failed to add mkit.ini to the index"
155
       || die "failed to add mkit.ini to the index"
156
     cache=$(mktemp -t "mkit._vbump_gitmsg.XXXXXXXX")
156
     cache=$(mktemp -t "mkit._vbump_gitmsg.XXXXXXXX")
157
-    _vbump_gitmsg > "$cache"
157
+    _vbump_gitmsg "$nextver" > "$cache"
158
     git commit -e -F "$cache"   # note: reading from stdin will break vim
158
     git commit -e -F "$cache"   # note: reading from stdin will break vim
159
     rm "$cache"
159
     rm "$cache"
160
 }
160
 }
163
     #
163
     #
164
     # Compose git message template for 'Bump version' commit
164
     # Compose git message template for 'Bump version' commit
165
     #
165
     #
166
-    echo "Bump version"
166
+    local nextver=$1
167
+    echo "Bump version to $nextver"
167
     echo ""
168
     echo ""
168
     echo "Overview of changes:"
169
     echo "Overview of changes:"
169
     echo ""
170
     echo ""

+ 1
- 1
utils/mkit/include/vars.sh 查看文件

86
 #
86
 #
87
 # This MKit version
87
 # This MKit version
88
 #
88
 #
89
-MKIT_VERSION=0.0.37
89
+MKIT_VERSION=0.0.39