25e5810ba3d33d8a3131e1e565c25d12e5420f0d
[feed/packages.git] / lang / ruby / ruby_missingfiles
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
6 function list_staging_files {
7 cd "$1"; find \
8 \( \( -name "root-*" -or -name "packages" -or -name "stamp" -or -name "pkginfo" -or -name "host" \) -prune \) -or -true \
9 \( -path "*ruby*" -or -name "erb" -or -name "gem" -or -name "irb" -or -name "rake" -or -name "rdoc" -or -name "ri" -or -name "testrb" \) \
10 -not -path "*/usr/include/*" -not -path "*/usr/lib/pkgconfig/*" -not -path "*/usr/lib/lib*.a" \
11 -not -path "*/usr/lib/ruby/gems/*/cache/*" \
12 -print | sort
13 }
14
15 function list_ipkg_files {
16 for OPKG; do
17 tar --to-stdout -xzf "$OPKG" ./data.tar.gz | tar tz | sed -e 's%/$%%'
18 done | sort -u
19 }
20
21
22 echo " Staging Packages"
23
24 : ${1:?First arg is staging_dir}
25 : ${2:?Second and following args are ruby ipkg packages}
26 STAGING_DIR=$1; shift
27 diff -d -y <(list_staging_files "$STAGING_DIR") <(list_ipkg_files "$@")
28