diff options
author | Jonathan Bauer | 2018-05-14 17:20:54 +0200 |
---|---|---|
committer | Jonathan Bauer | 2018-05-14 17:20:54 +0200 |
commit | 333cc06b637d140095b79d608b89f2607678b3c1 (patch) | |
tree | 6265d54764e1a95ca80296547207c6e81ced56d1 /core/bin | |
parent | Merge branch 'master' into installer (diff) | |
download | mltk-333cc06b637d140095b79d608b89f2607678b3c1.tar.gz mltk-333cc06b637d140095b79d608b89f2607678b3c1.tar.xz mltk-333cc06b637d140095b79d608b89f2607678b3c1.zip |
setup_target: installer mode support for addons
Diffstat (limited to 'core/bin')
-rwxr-xr-x | core/bin/setup_target | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/core/bin/setup_target b/core/bin/setup_target index 95dfe0f6..aebe7434 100755 --- a/core/bin/setup_target +++ b/core/bin/setup_target @@ -518,11 +518,20 @@ post_process_target() { # to / but rather builds the target traditionally. We then check file # by file instead of a blind tarcopy if [ ${REMOTE_LOCAL_INSTALL} -eq 1 ]; then - pinfo "Rsyncing local build to /..." - rsync -aAXv --exclude='etc/ld.so*' "${TARGET_BUILD_DIR}/" "/" || \ + # default dest and exclude list for non-addons + local RSYNC_DEST="/" + local RSYNC_EXCLUDE='etc/ld.so*' + if [ -e "${TARGET_DIR}/.addon" ]; then + RSYNC_DEST="/opt/openslx/addons/${TARGET}" + mkdir -p "${RSYNC_DEST}" || perror "Failed to mkdir '${RSYNC_DEST}'." + RSYNC_EXCLUDE= + pinfo "Target is an addon, will install to '${RSYNC_DEST}'." + fi + pinfo "Rsyncing local build to '${RSYNC_DEST}'..." + rsync -aAXv --exclude=${RSYNC_EXCLUDE} "${TARGET_BUILD_DIR}/" "${RSYNC_DEST}" || \ perror "Failed to rsync, your system is probably trashed ;-(" - # run regular ldconfig and we are done - ldconfig -v + # finish by running ldconfig for the running system (when processing non-addons). + [ "${RSYNC_DEST}" = "/" ] && ldconfig -v return 0 fi # figure out all relevant ld-paths |