Browse Source

Prepare destination dir if needed

Alois Mahdal 9 years ago
parent
commit
f112d9c564
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/include/deploy.sh

+ 1
- 0
src/include/deploy.sh View File

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