ruby_missingfiles 1.0 KB

12345678910111213141516171819202122232425262728
  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" \) -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. -print | sort
  12. }
  13. function list_ipkg_files {
  14. for OPKG; do
  15. tar --to-stdout -xzf "$OPKG" ./data.tar.gz | tar tz | sed -e 's%/$%%'
  16. done | sort -u
  17. }
  18. echo " Staging Packages"
  19. : ${1:?First arg is staging_dir}
  20. : ${2:?Second and following args are ruby ipkg packages}
  21. STAGING_DIR=$1; shift
  22. diff -d -y <(list_staging_files "$STAGING_DIR") <(list_ipkg_files "$@")