Browse Source

Update mkit to version from fastfoo 0.7.0+master.gee9d709

Alois Mahdal 9 years ago
parent
commit
f0e25b819a
4 changed files with 12 additions and 6 deletions
  1. 8
    5
      utils/mkit/include/build.sh
  2. 1
    1
      utils/mkit/include/deploy.sh
  3. 2
    0
      utils/mkit/include/mkit.sh
  4. 1
    0
      utils/mkit/make

+ 8
- 5
utils/mkit/include/build.sh View File

@@ -26,7 +26,8 @@ build1() {
26 26
         *.md) <"$srcpath" expand_includes | expand_variables >"$dstpath" ;;
27 27
         *)    <"$srcpath"                   expand_variables >"$dstpath" ;;
28 28
     esac
29
-    echo "$dstpath" >> built.list
29
+    mkdir -p "$MKIT_LOCAL"
30
+    echo "$dstpath" >> "$MKIT_LOCAL/built.lst"
30 31
 }
31 32
 
32 33
 build_manpages() {
@@ -38,7 +39,8 @@ build_manpages() {
38 39
             do
39 40
                 mdfile="$manfile.md"
40 41
                 ronn -r "$mdfile"
41
-                echo "$manfile" >> built.list
42
+                mkdir -p "$MKIT_LOCAL"
43
+                echo "$manfile" >> "$MKIT_LOCAL/built.lst"
42 44
             done
43 45
     else
44 46
         echo "ronn is not installed"
@@ -50,9 +52,10 @@ clean() {
50 52
     #
51 53
     # Clean up tree after building
52 54
     #
53
-    test -f built.list && {
54
-        <built.list xargs rm -f
55
-        rm -f built.list
55
+    test -f "$MKIT_LOCAL/built.lst" && {
56
+        <"$MKIT_LOCAL/built.lst" xargs -r rm -f
57
+        rm -f "$MKIT_LOCAL/built.lst"
58
+        rmdir --ignore-fail-on-non-empty "$MKIT_LOCAL"
56 59
     }
57 60
     true
58 61
 }

+ 1
- 1
utils/mkit/include/deploy.sh View File

@@ -80,7 +80,7 @@ install() {
80 80
                     deploy_item "$src" "$dst" "$mode"
81 81
                 done
82 82
         done
83
-    test -f .autoclean && clean
83
+    test -f "$MKIT_LOCAL/autoclean" && clean
84 84
     true
85 85
 }
86 86
 

+ 2
- 0
utils/mkit/include/mkit.sh View File

@@ -22,6 +22,8 @@ mkit_init() {
22 22
     sed -e 's/ = /=/' < config.mk > "$tmp"
23 23
     . "$tmp"
24 24
     rm -f "$tmp"
25
+    test -n "$(tr -d '[:space:]' <<<"$MKIT_LOCAL")" \
26
+     || die "MKIT_LOCAL must be non-blank: '$MKIT_LOCAL'"
25 27
 }
26 28
 
27 29
 die() {

+ 1
- 0
utils/mkit/make View File

@@ -7,6 +7,7 @@ die() {
7 7
 }
8 8
 
9 9
 export MKIT_DIR=${MKIT_DIR:-mkit}
10
+export MKIT_LOCAL=${MKIT_LOCAL:-.mkit}
10 11
 
11 12
 . "$MKIT_DIR/include/mkit.sh" || die "failed to init; check if MKIT_DIR is set properly: $MKIT_DIR"
12 13