rootfsdir.sh脚本中cp未考虑目的地址是否存在以及是否与源地址相同

This commit is contained in:
zhangfanfan2 2021-04-19 11:36:26 +08:00 committed by Gitee
parent 901b21e4d9
commit e14558a834
1 changed files with 2 additions and 2 deletions

View File

@ -39,10 +39,10 @@ ${ROOTFS_DIR}/app ${ROOTFS_DIR}/data ${ROOTFS_DIR}/proc ${ROOTFS_DIR}/dev ${ROOT
${ROOTFS_DIR}/system ${ROOTFS_DIR}/system/internal ${ROOTFS_DIR}/system/external ${ROOTFS_DIR}/system ${ROOTFS_DIR}/system/internal ${ROOTFS_DIR}/system/external
if [ -d "${BIN_DIR}" ] && [ "$(ls -A "${BIN_DIR}")" != "" ]; then if [ -d "${BIN_DIR}" ] && [ "$(ls -A "${BIN_DIR}")" != "" ]; then
cp -f ${BIN_DIR}/* ${ROOTFS_DIR}/bin cp -f ${BIN_DIR}/* ${ROOTFS_DIR}/bin
if [ -e ${BIN_DIR}/shell ]; then if [ -e ${BIN_DIR}/shell ] && [ "${BIN_DIR}/shell" != "${OUT_DIR}/bin/shell" ]; then
cp -f ${BIN_DIR}/shell ${OUT_DIR}/bin/shell cp -f ${BIN_DIR}/shell ${OUT_DIR}/bin/shell
fi fi
if [ -e ${BIN_DIR}/tftp ]; then if [ -e ${BIN_DIR}/tftp ] && [ "${BIN_DIR}/tftp" != "${OUT_DIR}/bin/tftp" ]; then
cp -f ${BIN_DIR}/tftp ${OUT_DIR}/bin/tftp cp -f ${BIN_DIR}/tftp ${OUT_DIR}/bin/tftp
fi fi
fi fi