summaryrefslogtreecommitdiffstats
path: root/helper/fileutil.inc
diff options
context:
space:
mode:
authorMichael Neves2013-04-04 14:59:23 +0200
committersr2013-04-12 19:11:40 +0200
commitad08ab331908838f9b25be17a731971ffee81914 (patch)
tree561564288438f37ee3a5dc7511069e4bbc2781fd /helper/fileutil.inc
parentrequired/optional packages. consolekit for rpm. (diff)
downloadtm-scripts-ad08ab331908838f9b25be17a731971ffee81914.tar.gz
tm-scripts-ad08ab331908838f9b25be17a731971ffee81914.tar.xz
tm-scripts-ad08ab331908838f9b25be17a731971ffee81914.zip
Size calculation fixed
Diffstat (limited to 'helper/fileutil.inc')
-rw-r--r--helper/fileutil.inc5
1 files changed, 2 insertions, 3 deletions
diff --git a/helper/fileutil.inc b/helper/fileutil.inc
index 6a4f5486..18f1db4e 100644
--- a/helper/fileutil.inc
+++ b/helper/fileutil.inc
@@ -98,7 +98,6 @@ calc_size() {
if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break }
}
}')
- TARGET_BUILD_SIZE=$CURRENT_BUILD_SIZE
}
#
@@ -118,7 +117,7 @@ generate_initramfs() {
[ "x${PS[1]}" != "x0" ] && perror "cpio create failed."
[ "x${PS[2]}" != "x0" ] && perror "gzip to '$3' failed."
cd - &> /dev/null
- pinfo "Created initramfs of $1 at $3"
+ pinfo "Created initramfs of $1 at $3. Size: $(du -bc "$3" | awk 'END {print $1}')"
}
# generates squashfs of directory
@@ -129,5 +128,5 @@ generate_squashfs() {
[ -d "$1" ] || perror "$1 is not a directory."
mksquashfs "$1" "$2" -comp xz -b 1M -no-recovery >&6 \
|| perror "mksquashfs failed ($?)."
- pinfo "Created squashfs of $1 at $2"
+ pinfo "Created squashfs of $1 at $2. Size: $(du -bc "$2" | awk 'END {print $1}')"
}