Bläddra i källkod

Fix building of markdown files

Code include expansion overwrote result of variable name expansion.

(This had no effect so far since there are no variables in markdown
files.)
Alois Mahdal 9 år sedan
förälder
incheckning
7cbb2a241a
1 ändrade filer med 9 tillägg och 5 borttagningar
  1. 9
    5
      setup/mk.sh

+ 9
- 5
setup/mk.sh Visa fil

@@ -36,11 +36,15 @@ build1() {
36 36
     local srcpath dstpath
37 37
     srcpath=$1
38 38
     dstpath=${srcpath%.skel}
39
-    expand_variables < $srcpath > $dstpath
40
-    if grep -qe '.md$' <<<"$dstpath";
41
-    then
42
-        expand_includes < $srcpath > $dstpath
43
-    fi
39
+    case $dstpath in
40
+        *.md)   cat $srcpath \
41
+                  | expand_includes \
42
+                  | expand_variables \
43
+                > $dstpath ;;
44
+        *)      cat $srcpath \
45
+                  | expand_variables \
46
+                > $dstpath ;;
47
+    esac
44 48
     echo $dstpath >> built.list
45 49
 }
46 50