Browse Source

Allow specifying destination when building item

Alois Mahdal 9 years ago
parent
commit
c2b4279b89
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/include/build.sh

+ 2
- 1
src/include/build.sh View File

21
     #
21
     #
22
     local srcpath dstpath
22
     local srcpath dstpath
23
     srcpath=$1
23
     srcpath=$1
24
-    dstpath=${srcpath%.skel}
24
+    dstpath=$2
25
+    test -n "$dstpath" || dstpath=${srcpath%.skel}
25
     case $dstpath in
26
     case $dstpath in
26
         *.md) <"$srcpath" expand_includes | expand_variables >"$dstpath" ;;
27
         *.md) <"$srcpath" expand_includes | expand_variables >"$dstpath" ;;
27
         *)    <"$srcpath"                   expand_variables >"$dstpath" ;;
28
         *)    <"$srcpath"                   expand_variables >"$dstpath" ;;