Browse Source

overlay: fixed directory removal/overriding support

user/chris/test/arm
Alejandro Mery 12 years ago
parent
commit
9798513d25
1 changed files with 11 additions and 4 deletions
  1. +11
    -4
      lib/overlay/overlay-functions.in

+ 11
- 4
lib/overlay/overlay-functions.in

@ -66,12 +66,20 @@ overlay_apply() {
xtarget="$rootfs/$target" targetdir="${xtarget%/*}"
if [ -L "$xtarget" -o -e "$xtarget" ]; then
if [ "$overwrite" = yes ]; then
[ "$type" = patch ] || rm -f "$xtarget"
else
if [ "$type" != rm -a "$overwrite" != yes ]; then
$echo_status "skipping $target ($type)"
continue
fi
if [ "$type" = patch ]; then
:
elif [ ! -d "$xtarget/" ]; then
rm -f "$xtarget"
elif [ "$type" = rm ]; then
rm -rf "$xtarget"
else
rmdir "$xtarget"
fi
fi
# final adjustments based on the type
@ -99,7 +107,6 @@ overlay_apply() {
;;
rm)
$echo_status "removing $target"
rm -f "$xtarget"
;;
patch)
$echo_status "overlay: patching $target"

Loading…
Cancel
Save