diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-04-13 13:26:26 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-04-13 13:26:26 +0000 |
commit | 94920b0e8aa56942754b219c4efc7e04490a57af (patch) | |
tree | 2ffcb09ed723f038ade7345655b07be7f697eb25 /tools/ipkg-utils/patches/180-add_installed_size.patch | |
parent | 95135046a5585108484c8d6159985f0e7df9565d (diff) | |
download | master-187ad058-94920b0e8aa56942754b219c4efc7e04490a57af.tar.gz master-187ad058-94920b0e8aa56942754b219c4efc7e04490a57af.tar.bz2 master-187ad058-94920b0e8aa56942754b219c4efc7e04490a57af.zip |
[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
Diffstat (limited to 'tools/ipkg-utils/patches/180-add_installed_size.patch')
-rw-r--r-- | tools/ipkg-utils/patches/180-add_installed_size.patch | 2 |
1 files changed, 1 insertions, 1 deletions
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 + |