Pārlūkot izejas kodu

Allow specifying destination when building item

Alois Mahdal 9 gadus atpakaļ
vecāks
revīzija
c2b4279b89
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2
    1
      src/include/build.sh

+ 2
- 1
src/include/build.sh Parādīt failu

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