瀏覽代碼

Prepare destination dir if needed

Alois Mahdal 9 年之前
父節點
當前提交
f112d9c564
共有 1 個檔案被更改,包括 1 行新增0 行删除
  1. 1
    0
      src/include/deploy.sh

+ 1
- 0
src/include/deploy.sh 查看文件

37
     local mode="${3:-$MKIT_DEFAULT_MODE}"
37
     local mode="${3:-$MKIT_DEFAULT_MODE}"
38
     if test -d "$src";
38
     if test -d "$src";
39
     then
39
     then
40
+        mkdir -vp "$(dirname "$dst")"
40
         cp -Tvr "$src" "$dst"
41
         cp -Tvr "$src" "$dst"
41
         find "$dst" -type f -print0 | xargs -0 chmod -c "$mode"
42
         find "$dst" -type f -print0 | xargs -0 chmod -c "$mode"
42
     else
43
     else