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
         *.md) <"$srcpath" expand_includes | expand_variables >"$dstpath" ;;
26
         *.md) <"$srcpath" expand_includes | expand_variables >"$dstpath" ;;
27
         *)    <"$srcpath"                   expand_variables >"$dstpath" ;;
27
         *)    <"$srcpath"                   expand_variables >"$dstpath" ;;
28
     esac
28
     esac
29
-    echo "$dstpath" >> built.list
29
+    mkdir -p "$MKIT_LOCAL"
30
+    echo "$dstpath" >> "$MKIT_LOCAL/built.lst"
30
 }
31
 }
31
 
32
 
32
 build_manpages() {
33
 build_manpages() {
38
             do
39
             do
39
                 mdfile="$manfile.md"
40
                 mdfile="$manfile.md"
40
                 ronn -r "$mdfile"
41
                 ronn -r "$mdfile"
41
-                echo "$manfile" >> built.list
42
+                mkdir -p "$MKIT_LOCAL"
43
+                echo "$manfile" >> "$MKIT_LOCAL/built.lst"
42
             done
44
             done
43
     else
45
     else
44
         echo "ronn is not installed"
46
         echo "ronn is not installed"
50
     #
52
     #
51
     # Clean up tree after building
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
     true
60
     true
58
 }
61
 }

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

80
                     deploy_item "$src" "$dst" "$mode"
80
                     deploy_item "$src" "$dst" "$mode"
81
                 done
81
                 done
82
         done
82
         done
83
-    test -f .autoclean && clean
83
+    test -f "$MKIT_LOCAL/autoclean" && clean
84
     true
84
     true
85
 }
85
 }
86
 
86
 

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

22
     sed -e 's/ = /=/' < config.mk > "$tmp"
22
     sed -e 's/ = /=/' < config.mk > "$tmp"
23
     . "$tmp"
23
     . "$tmp"
24
     rm -f "$tmp"
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
 die() {
29
 die() {

+ 1
- 0
utils/mkit/make View File

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