mkdiff_obj_bloat 618 B

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/sh
  2. test -d "$1" || exit 1
  3. test -d "$2" || exit 1
  4. {
  5. (
  6. cd "$1" || exit 1
  7. find -name '*.o' -o -name '*.os' # -o -name '*.so'
  8. )
  9. (
  10. cd "$2" || exit 1
  11. find -name '*.o' -o -name '*.os' # -o -name '*.so'
  12. )
  13. } | sed 's:^\./::' | sort | uniq | \
  14. tee LST | \
  15. (
  16. IFS=''
  17. while read -r oname; do
  18. if ! test -f "$1/$oname"; then
  19. echo "Only $2/$oname"
  20. continue
  21. fi
  22. if ! test -f "$2/$oname"; then
  23. echo "Only $1/$oname"
  24. continue
  25. fi
  26. $1/scripts/bloat-o-meter $1/$oname $2/$oname | grep 'otal: 0 byte' >/dev/null && continue
  27. $1/scripts/bloat-o-meter $1/$oname $2/$oname
  28. size $1/$oname $2/$oname
  29. echo
  30. done
  31. )