diff options
Diffstat (limited to 'remote/setup_target')
| -rwxr-xr-x | remote/setup_target | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/remote/setup_target b/remote/setup_target index b0565550..da4b7701 100755 --- a/remote/setup_target +++ b/remote/setup_target @@ -53,7 +53,7 @@ # MODE_DIR="${ROOT_DIR}/remote" MODULES_DIR="${MODE_DIR}/modules" - +EXPORT_DIR="/export/build" # Keep track of processed modules PROCESSED_MODULES="" @@ -93,6 +93,13 @@ read_build () { . "${BUILD_SCRIPT}" || perror "Sourcing '${BUILD_SCRIPT}' failed." } +export_builds() { + [ ! -d "${MODE_DIR}/builds" ] && perror "No ${MODE_DIR}/builds, nothing to export." + pinfo "Mounting ${MODE_DIR}/builds to ${EXPORT_DIR}. This will make the local builds syncable from another machine." + [ ! -d "${EXPORT_DIR}" ] && mkdir -p "${EXPORT_DIR}" + mount --bind ${MODE_DIR}/builds ${EXPORT_DIR} || perror "Failed to bind mount ${MODE_DIR}/builds to ${EXPORT_DIR}" +} + # # main function which copies all files, directories, binaries and external libraries to TARGET_BUILD_DIR # @@ -128,6 +135,8 @@ copy_files_with_deps () { else pdebug "\tFound ${FILENAME} at ${FILE}" fi + elif [ "$(echo $FILE_CANDIDATES | wc -w)" -eq 0 ]; then + perror "Could not find required binary $FILENAME" else # one candidate FINAL_LIST=${FILE_CANDIDATES} @@ -314,7 +323,12 @@ post_process_target() { rm -r "${TARGET_BUILD_DIR}/lib/systemd" fi - ldconfig -r "${TARGET_BUILD_DIR}" + # figure out all relevant ld-paths + local LDTEMP="$TARGET_BUILD_DIR/ldconf-temp" + grep -h '^\s*/' /etc/ld.so.conf /etc/ld.so.conf.d/* > "$LDTEMP" + # TODO: Echo other stuff to $LDTEMP (but figure out if first or last match wins) + ldconfig -v -r "${TARGET_BUILD_DIR}" -f "/ldconf-temp" + unlink "$LDTEMP" } |
