summaryrefslogtreecommitdiffstats
path: root/core/bin
diff options
context:
space:
mode:
authorJonathan Bauer2018-05-14 17:20:54 +0200
committerJonathan Bauer2018-05-14 17:20:54 +0200
commit333cc06b637d140095b79d608b89f2607678b3c1 (patch)
tree6265d54764e1a95ca80296547207c6e81ced56d1 /core/bin
parentMerge branch 'master' into installer (diff)
downloadmltk-333cc06b637d140095b79d608b89f2607678b3c1.tar.gz
mltk-333cc06b637d140095b79d608b89f2607678b3c1.tar.xz
mltk-333cc06b637d140095b79d608b89f2607678b3c1.zip
setup_target: installer mode support for addons
Diffstat (limited to 'core/bin')
-rwxr-xr-xcore/bin/setup_target17
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