[tools] ipkg-utils: use (g)stat instead of "du -b" to find package size, fixes Darwin...
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 13 Apr 2011 13:26:26 +0000 (13:26 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 13 Apr 2011 13:26:26 +0000 (13:26 +0000)
SVN-Revision: 26642

tools/ipkg-utils/patches/180-add_installed_size.patch

index 6ee7de8dbc0ada6b56ba81d9a390af2fa7b3a0bf..fb91a319097935bc5c67748685cc44bed8b97ae5 100644 (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
 +