You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.6 KiB

  1. #!/bin/bash
  2. #
  3. # bash feeds/packages/lang/ruby/ruby_missingfiles staging_dir/target-i386_i486_musl-1.1.11/ bin/x86/packages/packages/*ruby*_2.3.0*
  4. #
  5. function list_staging_files {
  6. cd "$1"; find \
  7. \( \( -name "root-*" -or -name "packages" -or -name "stamp" -or -name "pkginfo" -or -name "host" -or -name man \) -prune \) -or -true \
  8. \( -path "*ruby*" -or -name "erb" -or -name "gem" -or -name "irb" -or -name "rake" -or -name "rdoc" -or -name "ri" -or -name "testrb" \) \
  9. -not -path "*/usr/include/*" -not -path "*/usr/lib/pkgconfig/*" -not -path "*/usr/lib/lib*.a" \
  10. -not -path "*/usr/lib/ruby/gems/*/cache/*" \
  11. -not -path "*/usr/lib/libruby.so" \
  12. -not -name "*test_case.rb" \
  13. -not -name "*.rdoc" \
  14. -not -name "*.doc" \
  15. -not -name "*.md" \
  16. -not -name "*.txt" \
  17. -not -name "*.travis.yml" \
  18. -not -regex ".*/usr/lib/ruby/gems/[^/]*/gems/[^/]*/benchmark/.*" \
  19. -not -regex ".*/usr/lib/ruby/gems/[^/]*/gems/[^/]*/evaluation/.*" \
  20. -not -regex ".*/usr/lib/ruby/gems/[^/]*/gems/[^/]*/sample/.*" \
  21. -not -regex ".*/usr/lib/ruby/gems/[^/]*/gems/[^/]*/test/.*" \
  22. -not -regex ".*/usr/lib/ruby/gems/[^/]*/gems/[^/]*/doc/.*" \
  23. -not -type d \
  24. -print | sort
  25. }
  26. function list_ipkg_files {
  27. for OPKG; do
  28. tar --to-stdout -xzf "$OPKG" ./data.tar.gz | tar tzv | grep -v ^d | sed -e 's,.* \./,./,;s/ -> .*//'
  29. done | sort -u | grep -v ./usr/lib/ruby/ruby...-bin
  30. }
  31. echo " Installed in Staging Packages"
  32. : ${1:?First arg is staging_dir}
  33. : ${2:?Second and following args are ruby ipkg packages}
  34. STAGING_DIR=$1; shift
  35. diff -d -y <(list_staging_files "$STAGING_DIR") <(list_ipkg_files "$@")