Browse Source

overlay: added .bin type

karasz/new-early
Alejandro Mery 15 years ago
parent
commit
9a1420f811
1 changed files with 12 additions and 7 deletions
  1. +12
    -7
      lib/overlay/overlay-functions.in

+ 12
- 7
lib/overlay/overlay-functions.in

@ -19,7 +19,8 @@ overlay_get_type() {
case "$ext" in
sh|exec) echo "exec" ;;
txt|patch|ln) echo "$ext" ;;
txt|patch|ln|bin)
echo "$ext" ;;
*) # and skip anything else
;;
esac
@ -79,25 +80,29 @@ overlay_apply() {
*) mode=0644 ;;
esac
[ "$type" = "patch" ] || mkdir -p "$targetdir"
# and finally inject the file
case "$type" in
exec|txt)
bin|exec|txt)
$echo_status "injecting $target ($type)"
mkdir -p "$targetdir"
cat "$file" | rock_substitute > "$xtarget"
if [ "$type" = bin ]; then
cp "$file" "$xtarget"
else
cat "$file" | rock_substitute > "$xtarget"
fi
chmod $mode "$xtarget"
add_flist "$xtarget"
;;
ln) ref=$( cat "$file" | rock_substitute )
$echo_status "injecting $target -> $ref"
mkdir -p "$targetdir"
ln -snf "$ref" "$xtarget"
add_flist "$xtarget"
;;
patch)
$echo_status "$(patch $patchopt \
-d "${rootfs}" 2>&1 < $file )"
;;
esac
[ "$type" = "patch" ] || add_flist "$xtarget"
done
}

Loading…
Cancel
Save