diff options
author | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2013-06-30 01:42:08 -0500 |
---|---|---|
committer | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2013-06-30 01:42:08 -0500 |
commit | 6831de9cdb95c4dad414ccaf0a0c4ccf8d84c945 (patch) | |
tree | dda33c1f6f6e8a5ce2c9f9b55ad3ac7487c817fb /cygwin-find-provides.sh | |
parent | 7b587b2ad18ddf26a6f71447ed3198a8ec143bab (diff) | |
download | cygwin-filesystem-6831de9cdb95c4dad414ccaf0a0c4ccf8d84c945.tar.gz cygwin-filesystem-6831de9cdb95c4dad414ccaf0a0c4ccf8d84c945.tar.xz cygwin-filesystem-6831de9cdb95c4dad414ccaf0a0c4ccf8d84c945.zip |
Support both cygwin32 and cygwin64
Diffstat (limited to 'cygwin-find-provides.sh')
-rwxr-xr-x | cygwin-find-provides.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/cygwin-find-provides.sh b/cygwin-find-provides.sh index 81fccf4..c92fe6c 100755 --- a/cygwin-find-provides.sh +++ b/cygwin-find-provides.sh @@ -3,18 +3,24 @@ # This script reads filenames from STDIN and outputs any relevant provides # information that needs to be included in the package. -if [ "$1" ] -then - package_name="$1" +targets=$@ +if [ -z "$targets" ] ; then + echo "Usage: $0 [ cygwin32 ] [ cygwin64 ]" + exit 1 fi -[ -z "$OBJDUMP" ] && OBJDUMP=i686-pc-cygwin-objdump - filelist=`sed "s/['\"]/\\\&/g"` dlls=$(echo $filelist | tr [:blank:] '\n' | grep '\.dll$') for f in $dlls; do basename=`basename $f | tr [:upper:] [:lower:]` - echo "cygwin($basename)" + for target in $targets; do + host_triplet=`rpm --eval "%{${target}_target}"` + [[ $f =~ .*$host_triplet.* ]] && echo "$target($basename)" + # for backwards compatibility + [[ $f =~ .*i686-pc-cygwin.* ]] && echo "cygwin($basename)" + done done + +exit 0 |