source: trunk/tools/ipkg-utils/patches/180-add_installed_size.patch @ 26642

Last change on this file since 26642 was 26642, checked in by jow, 6 years ago

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

File size: 428 bytes
  • ipkg-build

    a b mkdir $tmp_dir 
    250250 
    251251echo $CONTROL > $tmp_dir/tarX 
    252252( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . ) 
     253 
     254installed_size=`stat -c "%s" $tmp_dir/data.tar.gz` 
     255sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \ 
     256        $pkg_dir/$CONTROL/control 
     257 
    253258( cd $pkg_dir/$CONTROL && $TAR $ogargs -czf $tmp_dir/control.tar.gz . ) 
    254259rm $tmp_dir/tarX 
    255260 
Note: See TracBrowser for help on using the repository browser.