diff options
author | Simon Rettberg | 2021-07-13 14:07:42 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-07-13 14:07:42 +0200 |
commit | fec3064455a748cdbce77243a69e3320ca3f1a70 (patch) | |
tree | 7499fe988d7fe93dc84b4bb2297b0e1ce2ee6055 | |
parent | [rootfs-stage32] use slx-tools in setup_partitions (diff) | |
download | mltk-fec3064455a748cdbce77243a69e3320ca3f1a70.tar.gz mltk-fec3064455a748cdbce77243a69e3320ca3f1a70.tar.xz mltk-fec3064455a748cdbce77243a69e3320ca3f1a70.zip |
Install mode: Check required directory existance too
-rwxr-xr-x | core/bin/setup_target | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/core/bin/setup_target b/core/bin/setup_target index 86e80e17..57cfa054 100755 --- a/core/bin/setup_target +++ b/core/bin/setup_target @@ -269,16 +269,20 @@ copy_files_with_deps () { local ENTRY="" for ENTRY in ${REQUIRED_DIRECTORIES}; do [[ "$ENTRY" == /* ]] || perror "All entries in REQUIRED_DIRECTORIES have to start with a slash '/', but $ENTRY does not!" - [ -e "$ENTRY" -a ! -d "$ENTRY" ] && perror "$ENTRY is not a directory" + [ -e "$ENTRY" -a ! -d "$ENTRY" ] && perror "$ENTRY is not a directory in base system" pdebug "* $ENTRY" - ENTRY=".${ENTRY}" - echo "${ENTRY}" >> "${COPYFILES_LIST}" - for BIN in $(find "${ENTRY}" -type f -a \( -executable -o -name '*.so*' \) -a -not -name '*.a'); do - [ -f "$BIN" ] || continue - #pdebug "\tSearching libs for ${BIN}..." - get_link_chain "${MODULE_BUILD_DIR}/${BIN}" "${MODULE_BUILD_DIR}" >> "${COPYFILES_LIST}" - get_dynamic_dependencies -l "${MODULE_BUILD_DIR}" "${BIN}" >> "${COPYFILES_LIST}" - done + if [ -d ".${ENTRY}" ]; then + ENTRY=".${ENTRY}" + echo "${ENTRY}" >> "${COPYFILES_LIST}" + for BIN in $(find "${ENTRY}" -type f -a \( -executable -o -name '*.so*' \) -a -not -name '*.a'); do + [ -f "$BIN" ] || continue + #pdebug "\tSearching libs for ${BIN}..." + get_link_chain "${MODULE_BUILD_DIR}/${BIN}" "${MODULE_BUILD_DIR}" >> "${COPYFILES_LIST}" + get_dynamic_dependencies -l "${MODULE_BUILD_DIR}" "${BIN}" >> "${COPYFILES_LIST}" + done + elif [ -z "$MLTK_INSTALL" ] || ! [ -d "$ENTRY" ]; then + perror "Required directory $ENTRY not found" + fi done # from REQUIRED_FILES - these are assumed to be simple files, so only follow symlinks |