summaryrefslogtreecommitdiffstats
path: root/remote/setup_target
diff options
context:
space:
mode:
authorDirk2014-02-21 11:16:02 +0100
committerDirk2014-02-21 11:16:02 +0100
commit1e30627c5b00884054fae7210d036e34ebe4f181 (patch)
tree6d258c5a7a2279881706f38e37921dc4557a0b8d /remote/setup_target
parentSetzen des Windows-Namens beim Booten aus Laufwerk B: (diff)
parent[nvidia_libs] Debug: Checkin für Joey:). (diff)
downloadtm-scripts-1e30627c5b00884054fae7210d036e34ebe4f181.tar.gz
tm-scripts-1e30627c5b00884054fae7210d036e34ebe4f181.tar.xz
tm-scripts-1e30627c5b00884054fae7210d036e34ebe4f181.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
...
Diffstat (limited to 'remote/setup_target')
-rwxr-xr-xremote/setup_target10
1 files changed, 7 insertions, 3 deletions
diff --git a/remote/setup_target b/remote/setup_target
index 11a8ffbb..4b026a6d 100755
--- a/remote/setup_target
+++ b/remote/setup_target
@@ -54,11 +54,13 @@
MODE_DIR="${ROOT_DIR}/remote"
MODULES_DIR="${MODE_DIR}/modules"
EXPORT_DIR="/export/build"
+[ -z "$REMOTE_EXPORT_DIR" ] || EXPORT_DIR=$REMOTE_EXPORT_DIR
# Keep track of processed modules so we don't
# build a module multiple times when following dependencies
PROCESSED_MODULES=""
initial_checks () {
+ get_kernel_version
detect_distribution
}
@@ -120,7 +122,7 @@ read_build () {
export_builds() {
[ ! -d "${MODE_DIR}/builds" ] && perror "No ${MODE_DIR}/builds, nothing to export."
- if mount|grep -q tm-scripts/remote/builds; then
+ if mount|grep -q ${MODE_DIR}/builds; then
pwarning "${MODE_DIR}/builds already exported! Ignoring..."
return 1;
fi
@@ -389,6 +391,8 @@ process_module() {
pdebug "## Installing dependencies"
cd "${MODULE_DIR}" || perror "cd to '${MODULE_DIR}' failed."
install_dependencies
+ # update kernel version variables before running a module, as the last one might have been the kernel...
+ get_kernel_version
# Fetch source code
if [ ! -e "$SOURCE_FLAG" ]; then
pinfo "## Fetching source"
@@ -523,8 +527,8 @@ clean_kernel_module() {
[ "x$USER_INPUT" == "xy" ] && CLEAN=1
fi
- pinfo "Cleaning kernel module (including sources and compiled stuff)."
if [[ $CLEAN == 1 ]]; then
+ pinfo "Cleaning kernel module (including sources and compiled stuff)."
cd "${TARGET_DIR}/kernel" || perror "Could not cd to ${TARGET_DIR}/kernel"
if [ -e build ]; then
rm -rf build || perror "Could not delete ${TARGET_DIR}/kernel/build"
@@ -548,10 +552,10 @@ clean_kernel_module() {
if [ -L ksrc ]; then
unlink ksrc || perror "Could not unlink ${TARGET_DIR}/kernel/ksrc."
fi
+ pinfo "Done cleaning kernel."
else
pinfo "Not confirmed, not cleaning kernel module."
fi
- pinfo "Done cleaning kernel."
}
# Recursively strip binaries and libraries in the given directory