Просмотр исходного кода

Fix dry mode for find/chmod

In local install, the files could be present, so relying on find to find
nothing did not work.  chmod must be properly sandboxed.
Alois Mahdal 10 лет назад
Родитель
Сommit
8b12150a66
1 измененных файлов: 5 добавлений и 1 удалений
  1. 5
    1
      src/include/deploy.sh

+ 5
- 1
src/include/deploy.sh Просмотреть файл

44
     then
44
     then
45
         _maybe mkdir -vp "$(dirname "$dst")"
45
         _maybe mkdir -vp "$(dirname "$dst")"
46
         _maybe cp -Tvr "$src" "$dst"
46
         _maybe cp -Tvr "$src" "$dst"
47
-        find "$dst" -type f -print0 | xargs -0 chmod -c "$mode"
47
+        find "$dst" -type f \
48
+          | while read chmod_item;
49
+            do
50
+                _maybe chmod "$mode" "$chmod_item"
51
+            done
48
     else
52
     else
49
         _maybe install -DTvm "$mode" "$src" "$dst"
53
         _maybe install -DTvm "$mode" "$src" "$dst"
50
     fi
54
     fi