diff options
| -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!" |
