[tools] ipkg-utils: use (g)stat instead of "du -b" to find package size, fixes Darwin compat (#9214)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26642 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Jo-Philipp Wich 2011-04-13 13:26:26 +00:00
parent 95135046a5
commit 94920b0e8a
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@
echo $CONTROL > $tmp_dir/tarX
( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
+
+installed_size=`du -b $tmp_dir/data.tar.gz | cut -f1`
+installed_size=`stat -c "%s" $tmp_dir/data.tar.gz`
+sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \
+ $pkg_dir/$CONTROL/control
+