diff options
author | Michael Pereira Neves | 2014-05-23 19:08:16 +0200 |
---|---|---|
committer | Michael Pereira Neves | 2014-05-23 19:08:16 +0200 |
commit | 8621abf168aca8349d4ef4cacc2603adbc25a026 (patch) | |
tree | 0c49b3ef42966f51f9ec19a8fe33dec17850be29 /remote/setup_target | |
parent | [openslx] remove obsolete 'server' from help message (diff) | |
download | tm-scripts-8621abf168aca8349d4ef4cacc2603adbc25a026.tar.gz tm-scripts-8621abf168aca8349d4ef4cacc2603adbc25a026.tar.xz tm-scripts-8621abf168aca8349d4ef4cacc2603adbc25a026.zip |
[setup_target] fix size calculation of modules
Diffstat (limited to 'remote/setup_target')
-rwxr-xr-x | remote/setup_target | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/remote/setup_target b/remote/setup_target index 5da8d0e7..bd1c69d0 100755 --- a/remote/setup_target +++ b/remote/setup_target @@ -304,11 +304,6 @@ generate_target() { pinfo "Copying libc and ld-linux used by ${SHELL}" tarcopy "$(list_basic_libs)" "${TARGET_BUILD_DIR}" - if [ -d "$TARGET_BUILD_DIR" ]; then - TARGET_BUILD_SIZE=$(du -bc "${TARGET_BUILD_DIR}" | awk 'END {print $1}') - else - TARGET_BUILD_SIZE=0 - fi # now iterate over given tools and copy them while (( "$#" )); do process_module "$1" @@ -384,6 +379,12 @@ process_module() { fi [ -n "$DEPOF" ] && local DEPOF_STR="(dependency of${DEPOF})" pinfo ">>>>>>>>>>>>>>>>> Processing module [ $MODULE ] $DEPOF_STR" + # Update size of target build dir + if [ -d "${TARGET_BUILD_DIR}" ]; then + TARGET_BUILD_SIZE=$(du -bc "${TARGET_BUILD_DIR}" | awk 'END {print $1}') + else + TARGET_BUILD_SIZE=0 + fi # Source .build script of module pdebug "## Reading .build of $MODULE" read_build @@ -432,12 +433,6 @@ process_module() { if [ ! -f "$MD5FILE" ]; then md5sum "$MODULE_DIR/module".* > "$MD5FILE" || perror "Could not create $MD5FILE" fi - # Update size of target build dir - if [ -d "${TARGET_BUILD_DIR}" ]; then - TARGET_BUILD_SIZE=$(du -bc "${TARGET_BUILD_DIR}" | awk 'END {print $1}') - else - TARGET_BUILD_SIZE=0 - fi # Sanity checks [ -e "$TARGET_BUILD_DIR/var/run" -a ! -L "$TARGET_BUILD_DIR/var/run" ] && perror "Messup datected: $TARGET_BUILD_DIR/var/run exists and is not a symlink!" [ -e "$TARGET_BUILD_DIR/var/lock" -a ! -L "$TARGET_BUILD_DIR/var/lock" ] && perror "Messup datected: $TARGET_BUILD_DIR/var/lock exists and is not a symlink!" |