diff --git a/scripts/image b/scripts/image index 7a0d80acfd..4c458d36c2 100755 --- a/scripts/image +++ b/scripts/image @@ -184,7 +184,7 @@ ln -sf /etc/issue ${INSTALL}/etc/motd # Copy PROJECT related files to filesystem if [ -d "${PROJECT_DIR}/${PROJECT}/filesystem" ]; then - cp -PR ${PROJECT_DIR}/${PROJECT}/filesystem/* ${INSTALL} + cp -PR --remove-destination ${PROJECT_DIR}/${PROJECT}/filesystem/* ${INSTALL} # Install project specific systemd services for service in ${PROJECT_DIR}/${PROJECT}/filesystem/usr/lib/systemd/system/*.service; do if [ -f "${service}" ]; then @@ -195,7 +195,7 @@ fi # Copy DEVICE related files to filesystem if [ -n "${DEVICE}" -a -d "${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/filesystem" ]; then - cp -PR ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/filesystem/* ${INSTALL} + cp -PR --remove-destination ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/filesystem/* ${INSTALL} # Install device specific systemd services for service in ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/filesystem/usr/lib/systemd/system/*.service; do if [ -f "${service}" ]; then