From: Jo-Philipp Wich Date: Wed, 13 Apr 2011 13:26:26 +0000 (+0000) Subject: ipkg-utils: use (g)stat instead of "du -b" to find package size, fixes Darwin compat... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2702ba56f09c22fca8e7bb269af110d0959dc7f3;p=openwrt%2Fstaging%2Fthess.git ipkg-utils: use (g)stat instead of "du -b" to find package size, fixes Darwin compat (#9214) SVN-Revision: 26642 --- diff --git a/tools/ipkg-utils/patches/180-add_installed_size.patch b/tools/ipkg-utils/patches/180-add_installed_size.patch index 6ee7de8dbc..fb91a31909 100644 --- a/tools/ipkg-utils/patches/180-add_installed_size.patch +++ b/tools/ipkg-utils/patches/180-add_installed_size.patch @@ -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 +